@@ -17,7 +17,7 @@ use client::{RcloneClient, RcloneFileListing};
1717use components:: queue_button:: QueueButton ;
1818use components:: string_prompt_dialog:: { StringPromptDialog , StringPromptDialogInit , StringPromptDialogOutMsg } ;
1919use config:: AppConfig ;
20- use dirs:: { cache_dir, home_dir } ;
20+ use dirs:: cache_dir;
2121use globals:: JOBS ;
2222use model:: { RcloneJob , RcloneJobType } ;
2323use path_tools:: RclonePath ;
@@ -1082,22 +1082,10 @@ impl Component for App {
10821082 SaveDialogResponse :: Accept ( path) => Self :: Input :: DownloadPathConfirmed ( RclonePath :: from ( & path. into_os_string ( ) . into_string ( ) . unwrap ( ) ) ) ,
10831083 SaveDialogResponse :: Cancel => Self :: Input :: NoOperation ,
10841084 } ) ;
1085- let mut target_directory: Option < PathBuf > = None ;
1086- if let Some ( home_path) = home_dir ( ) {
1087- let desktop_path = home_path. join ( "Desktop" ) ;
1088- if desktop_path. exists ( ) {
1089- target_directory = Some ( desktop_path) ;
1090- } else {
1091- target_directory = Some ( home_path) ;
1092- }
1093- } let position = self . file_listing_view_wrapper . selection_model . selected ( ) ;
1085+ let position = self . file_listing_view_wrapper . selection_model . selected ( ) ;
10941086 if let Some ( item) = self . file_listing_view_wrapper . get ( position) {
10951087 let selected_remote_item_path = item. borrow ( ) . model . path . clone ( ) ;
1096- if let Some ( target_directory_unwrapped) = target_directory {
1097- dialog. emit ( SaveDialogMsg :: SaveAs ( target_directory_unwrapped. join ( selected_remote_item_path. filename ( ) ) . into_os_string ( ) . into_string ( ) . unwrap ( ) ) ) ;
1098- } else {
1099- dialog. emit ( SaveDialogMsg :: SaveAs ( selected_remote_item_path. filename ( ) ) ) ;
1100- }
1088+ dialog. emit ( SaveDialogMsg :: SaveAs ( selected_remote_item_path. filename ( ) ) ) ;
11011089
11021090 self . save_copy_dialog = Some ( dialog) ;
11031091 }
0 commit comments