Skip to content

Commit 032069f

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

File tree

1 file changed

+10
-7
lines changed
  • QuickNotes/Community.PowerToys.Run.Plugin.QuickNotes

1 file changed

+10
-7
lines changed

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

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -973,15 +973,18 @@ 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-
// 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
979979
{
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+
}
983986
};
984-
Process.Start(startInfo);
987+
process.Start();
985988

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

0 commit comments

Comments
 (0)