From 3f6cbdaaa137fa77a0b3790264048f43964f72e0 Mon Sep 17 00:00:00 2001 From: GamingGuy003 Date: Tue, 24 Sep 2024 21:26:11 +0200 Subject: [PATCH] Fixed crash when opening logdump --- src/frontend/iced.rs | 23 +++++++++++++---------- src/frontend/panels/information.rs | 2 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/src/frontend/iced.rs b/src/frontend/iced.rs index 03d1c3e9..c434bd89 100644 --- a/src/frontend/iced.rs +++ b/src/frontend/iced.rs @@ -614,17 +614,20 @@ impl Raspirus { }, }), // open a path - Message::Open { path } => iced::Task::done({ - info!("Opening {}...", path.to_string_lossy()); - match open::that(path) { - Ok(_) => Message::None, - Err(message) => Message::Error { - case: ErrorCase::Warning { - message: message.to_string(), + Message::Open { path } => iced::Task::perform( + async { + info!("Opening {}...", path.to_string_lossy()); + match open::that(path) { + Ok(_) => Message::None, + Err(message) => Message::Error { + case: ErrorCase::Warning { + message: message.to_string(), + }, }, - }, - } - }), + } + }, + |result| result, + ), Message::OpenTerms => { self.state = State::Terms; iced::Task::none() diff --git a/src/frontend/panels/information.rs b/src/frontend/panels/information.rs index d0d57a30..dfbc29ad 100644 --- a/src/frontend/panels/information.rs +++ b/src/frontend/panels/information.rs @@ -104,7 +104,7 @@ impl Raspirus { .push(Self::info_card( svg_plain(crate::USER_CODE), t!("maintainers"), - "Benjamin Demetz, Felix Hell Björn".into(), + "Benjamin Demetz, Björn Felix Hell".into(), )) .push(Self::info_card( svg_plain(crate::GIT_COMMIT),