mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2025-01-23 01:36:57 -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:
commit
e84d28b7b6
1 changed files with 2 additions and 1 deletions
|
@ -183,6 +183,7 @@ namespace SourceGit.Native
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fullpath = new DirectoryInfo(path!).FullName;
|
fullpath = new DirectoryInfo(path!).FullName;
|
||||||
|
fullpath += Path.DirectorySeparatorChar;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (select)
|
if (select)
|
||||||
|
@ -202,7 +203,7 @@ namespace SourceGit.Native
|
||||||
public void OpenWithDefaultEditor(string file)
|
public void OpenWithDefaultEditor(string file)
|
||||||
{
|
{
|
||||||
var info = new FileInfo(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;
|
start.CreateNoWindow = true;
|
||||||
Process.Start(start);
|
Process.Start(start);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue