Skip to content

Commit 8c1d520

Browse files
authored
Merge pull request #4043 from Nexus-Mods/fix/exception-when-opening-folder
Fix exceptions when opening logs folder
2 parents 4b52f85 + 1614785 commit 8c1d520

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/NexusMods.Backend/OS/WindowsInterop.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ public void OpenDirectory(AbsolutePath directoryPath)
6565
// exists immediately. The process lifetime isn't tied to the window.
6666
// https://ss64.com/nt/explorer.html
6767
var nativePath = directoryPath.ToNativeSeparators(_fileSystem.OS);
68-
var command = Cli.Wrap("explorer.exe").WithArguments($@"""{nativePath}""");
68+
var command = Cli.Wrap("explorer.exe").WithArguments($@"""{nativePath}""")
69+
.WithValidation(CommandResultValidation.None);
6970
_processRunner.Run(command, logOutput: false);
7071
}
7172

@@ -75,7 +76,8 @@ public void OpenFileInDirectory(AbsolutePath filePath)
7576
// exists immediately. The process lifetime isn't tied to the window.
7677
// https://ss64.com/nt/explorer.html
7778
var nativePath = filePath.ToNativeSeparators(_fileSystem.OS);
78-
var command = Cli.Wrap("explorer.exe").WithArguments($@"/select,""{nativePath}""");
79+
var command = Cli.Wrap("explorer.exe").WithArguments($@"/select,""{nativePath}""")
80+
.WithValidation(CommandResultValidation.None);
7981
_processRunner.Run(command, logOutput: false);
8082
}
8183

0 commit comments

Comments
 (0)