File tree Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Expand file tree Collapse file tree 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -973,9 +973,8 @@ 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
- // 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
976
+ // Open the folder in Explorer
977
+ var folderProcess = new Process
979
978
{
980
979
StartInfo = new ProcessStartInfo
981
980
{
@@ -984,7 +983,18 @@ private List<Result> BackupNotes()
984
983
Verb = "open"
985
984
}
986
985
} ;
987
- process . Start ( ) ;
986
+ folderProcess . Start ( ) ;
987
+
988
+ // Also open the backup file itself in default text editor
989
+ var fileProcess = new Process
990
+ {
991
+ StartInfo = new ProcessStartInfo
992
+ {
993
+ FileName = backupFileName ,
994
+ UseShellExecute = true
995
+ }
996
+ } ;
997
+ fileProcess . Start ( ) ;
988
998
989
999
return SingleInfoResult ( "Backup created" , $ "Backup saved to { Path . GetFileName ( backupFileName ) } in QuickNotes folder.", true ) ;
990
1000
}
You can’t perform that action at this time.
0 commit comments