Use default Windows file handler

This commit is contained in:
Aidan M 2024-07-03 20:24:50 +01:00
parent 5cc6d866ea
commit fdce8e2f1b

View File

@ -56,7 +56,6 @@ namespace Wabbajack
}
}
public static void OpenWebsite(Uri url)
{
Process.Start(new ProcessStartInfo("cmd.exe", $"/c start {url}")
@ -64,16 +63,17 @@ namespace Wabbajack
CreateNoWindow = true,
});
}
public static void OpenFolder(AbsolutePath path)
{
Process.Start(new ProcessStartInfo(KnownFolders.Windows.Combine("explorer.exe").ToString(), path.ToString())
Process.Start(new ProcessStartInfo()
{
CreateNoWindow = true,
FileName = path.ToString(),
UseShellExecute = true,
Verb = "open"
});
}
public static AbsolutePath OpenFileDialog(string filter, string initialDirectory = null)
{
OpenFileDialog ofd = new OpenFileDialog();