File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -973,15 +973,18 @@ private List<Result> BackupNotes()
973
973
string backupFileName = Path . Combine ( notesDir , $ "notes_backup_{ DateTime . Now : yyyyMMdd_HHmmss} .txt") ;
974
974
File . Copy ( _notesPath , backupFileName , true ) ;
975
975
976
- // Open only one Windows Explorer with the backup file selected
977
- // Use ProcessStartInfo for better control over the process
978
- var startInfo = new ProcessStartInfo
976
+ // Simply open the folder that contains the backup file
977
+ // This is a simpler approach that should avoid multiple windows
978
+ var process = new Process
979
979
{
980
- FileName = "explorer.exe" ,
981
- Arguments = $ "/select,\" { backupFileName } \" ",
982
- UseShellExecute = false
980
+ StartInfo = new ProcessStartInfo
981
+ {
982
+ FileName = notesDir ,
983
+ UseShellExecute = true ,
984
+ Verb = "open"
985
+ }
983
986
} ;
984
- Process . Start ( startInfo ) ;
987
+ process . Start ( ) ;
985
988
986
989
return SingleInfoResult ( "Backup created" , $ "Backup saved to { Path . GetFileName ( backupFileName ) } in QuickNotes folder.", true ) ;
987
990
}
You can’t perform that action at this time.
0 commit comments