diff --git a/Wabbajack.App.Wpf/Util/UIUtils.cs b/Wabbajack.App.Wpf/Util/UIUtils.cs index 152de857..b4fc10ac 100644 --- a/Wabbajack.App.Wpf/Util/UIUtils.cs +++ b/Wabbajack.App.Wpf/Util/UIUtils.cs @@ -56,7 +56,6 @@ namespace Wabbajack } } - public static void OpenWebsite(Uri url) { Process.Start(new ProcessStartInfo("cmd.exe", $"/c start {url}") @@ -64,16 +63,23 @@ namespace Wabbajack CreateNoWindow = true, }); } - + public static void OpenFolder(AbsolutePath path) { - Process.Start(new ProcessStartInfo(KnownFolders.Windows.Combine("explorer.exe").ToString(), path.ToString()) + string folderPath = path.ToString(); + if (!folderPath.EndsWith(Path.DirectorySeparatorChar.ToString())) { - CreateNoWindow = true, + folderPath += Path.DirectorySeparatorChar.ToString(); + } + + Process.Start(new ProcessStartInfo() + { + FileName = folderPath, + UseShellExecute = true, + Verb = "open" }); } - public static AbsolutePath OpenFileDialog(string filter, string initialDirectory = null) { OpenFileDialog ofd = new OpenFileDialog(); diff --git a/Wabbajack.App.Wpf/View Models/Installers/MO2InstallerVM.cs b/Wabbajack.App.Wpf/View Models/Installers/MO2InstallerVM.cs index f9bc25a4..623381e0 100644 --- a/Wabbajack.App.Wpf/View Models/Installers/MO2InstallerVM.cs +++ b/Wabbajack.App.Wpf/View Models/Installers/MO2InstallerVM.cs @@ -77,7 +77,7 @@ namespace Wabbajack public void AfterInstallNavigation() { - Process.Start("explorer.exe", Location.TargetPath.ToString()); + UIUtils.OpenFolder(Location.TargetPath); } public async Task Install()