mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-10-31 13:03:20 -07: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:
commit
e84d28b7b6
1 changed files with 2 additions and 1 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue