Skip to content

Commit c772d23

Browse files
CopilotJack251970
andcommitted
Fix OpenDirectory to use explorer.exe explicitly to avoid access denied errors
Co-authored-by: Jack251970 <53996452+Jack251970@users.noreply.github.com>
1 parent de56e0f commit c772d23

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

ContextMenuManager/BluePointLilac.Methods/ExternalProgram.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,9 @@ public static void OpenDirectory(string dirPath)
114114
if(!Directory.Exists(dirPath)) return;
115115
using(Process process = new Process())
116116
{
117-
process.StartInfo.FileName = dirPath;
117+
process.StartInfo.FileName = "explorer.exe";
118+
process.StartInfo.Arguments = $"\"{dirPath}\"";
119+
process.StartInfo.UseShellExecute = false;
118120
process.Start();
119121
}
120122
}

0 commit comments

Comments
 (0)