Skip to content

Commit 0598cd6

Browse files
committed
Improve README with new features
1 parent 032069f commit 0598cd6

File tree

1 file changed

+14
-4
lines changed
  • QuickNotes/Community.PowerToys.Run.Plugin.QuickNotes

1 file changed

+14
-4
lines changed

QuickNotes/Community.PowerToys.Run.Plugin.QuickNotes/Main.cs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -973,9 +973,8 @@ private List<Result> BackupNotes()
973973
string backupFileName = Path.Combine(notesDir, $"notes_backup_{DateTime.Now:yyyyMMdd_HHmmss}.txt");
974974
File.Copy(_notesPath, backupFileName, true);
975975

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
979978
{
980979
StartInfo = new ProcessStartInfo
981980
{
@@ -984,7 +983,18 @@ private List<Result> BackupNotes()
984983
Verb = "open"
985984
}
986985
};
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();
988998

989999
return SingleInfoResult("Backup created", $"Backup saved to {Path.GetFileName(backupFileName)} in QuickNotes folder.", true);
9901000
}

0 commit comments

Comments
 (0)