File tree Expand file tree Collapse file tree 2 files changed +19
-20
lines changed Expand file tree Collapse file tree 2 files changed +19
-20
lines changed Original file line number Diff line number Diff line change @@ -974,29 +974,28 @@ private List<Result> BackupNotes()
974
974
File . Copy ( _notesPath , backupFileName , true ) ;
975
975
976
976
// Open the folder in Explorer
977
- var folderProcess = new Process
977
+ try
978
978
{
979
- StartInfo = new ProcessStartInfo
979
+ var folderProcess = new Process
980
980
{
981
- FileName = notesDir ,
982
- UseShellExecute = true ,
983
- Verb = "open"
984
- }
985
- } ;
986
- folderProcess . Start ( ) ;
987
-
988
- // Also open the backup file itself in default text editor
989
- var fileProcess = new Process
981
+ StartInfo = new ProcessStartInfo
982
+ {
983
+ FileName = notesDir ,
984
+ UseShellExecute = true ,
985
+ Verb = "open"
986
+ }
987
+ } ;
988
+ folderProcess . Start ( ) ;
989
+ }
990
+ catch ( Exception ex )
990
991
{
991
- StartInfo = new ProcessStartInfo
992
- {
993
- FileName = backupFileName ,
994
- UseShellExecute = true
995
- }
996
- } ;
997
- fileProcess . Start ( ) ;
992
+ // If we can't open the folder, just continue with the backup
993
+ Log . Exception ( "Failed to open backup folder" , ex , GetType ( ) ) ;
994
+ }
998
995
999
- return SingleInfoResult ( "Backup created" , $ "Backup saved to { Path . GetFileName ( backupFileName ) } in QuickNotes folder.", true ) ;
996
+ return SingleInfoResult ( "Backup created" ,
997
+ $ "Backup saved to: { backupFileName } \n \n " +
998
+ "The backup folder has been opened for you." , true ) ;
1000
999
}
1001
1000
catch ( Exception ex )
1002
1001
{
Original file line number Diff line number Diff line change 4
4
"IsGlobal" : false ,
5
5
"Name" : " QuickNotes" ,
6
6
"Author" : " ruslanlap" ,
7
- "Version" : " 0.1.0 " ,
7
+ "Version" : " 0.1.1 " ,
8
8
"Language" : " csharp" ,
9
9
"Website" : " https://github.com/ruslanlap/PowerToysRun-QuickNotes" ,
10
10
"ExecuteFileName" : " Community.PowerToys.Run.Plugin.QuickNotes.dll" ,
You can’t perform that action at this time.
0 commit comments