mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-23 18:30:34 +08:00
Merge pull request #392 from ChiahongHong/file-explorer
Prevent executing an executable file with the same name as the directory
This commit is contained in:
@@ -183,6 +183,7 @@ namespace SourceGit.Native
|
||||
else
|
||||
{
|
||||
fullpath = new DirectoryInfo(path!).FullName;
|
||||
fullpath += Path.DirectorySeparatorChar;
|
||||
}
|
||||
|
||||
if (select)
|
||||
@@ -202,7 +203,7 @@ namespace SourceGit.Native
|
||||
public void OpenWithDefaultEditor(string file)
|
||||
{
|
||||
var info = new FileInfo(file);
|
||||
var start = new ProcessStartInfo("cmd", $"/c start {info.FullName}");
|
||||
var start = new ProcessStartInfo("cmd", $"/c start \"\" \"{info.FullName}\"");
|
||||
start.CreateNoWindow = true;
|
||||
Process.Start(start);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user