From a1d90419734328489b1a5fc1a72f1f528e60e2b6 Mon Sep 17 00:00:00 2001 From: ochibani <11yzyv86j@relay.firefox.com> Date: Sun, 22 Dec 2024 16:15:49 +0200 Subject: [PATCH] change folder_chooser_name --- gui/src/ui.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gui/src/ui.rs b/gui/src/ui.rs index 49d6a85..56ac594 100644 --- a/gui/src/ui.rs +++ b/gui/src/ui.rs @@ -506,11 +506,7 @@ fn build_ui(application: &Application, error_dialog: MessageDialog, error_messag .unwrap(); let _error_dialog = error_dialog.clone(); let _error_message = error_message.clone(); - let folder_chooser_name = if folder_chooser.basename().is_some() { - folder_chooser.basename().unwrap().to_string_lossy().to_string() - } else { - String::from("") - }; + let folder_chooser_name = folder_chooser.basename().unwrap().to_string_lossy().to_string(); folder_chooser_label.set_label(&folder_chooser_name); let folder_chooser_icon = config_management::folder_icon(Some(folder_chooser_name.as_str())); folder_chooser_image.set_icon_name(Some(folder_chooser_icon));