Skip to content

Commit

Permalink
b4538 -- fix 4537
Browse files Browse the repository at this point in the history
  • Loading branch information
w17 committed Feb 3, 2016
1 parent 3cf25e9 commit 1256596
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
6 changes: 5 additions & 1 deletion far/changelog
@@ -1,4 +1,8 @@
w17 03.02.2016 16:10:50 +0300 - build 4537
w17 03.02.2016 17:48:03 +0300 - build 4538

1. Уточнение 4537.

w17 03.02.2016 16:10:50 +0300 - build 4537

1. M#2922: символьная ссылка на исполняемый файл создает отдельную консоль при запуске

Expand Down
23 changes: 10 additions & 13 deletions far/execute.cpp
Expand Up @@ -877,23 +877,20 @@ bool Execute(execute_info& Info, bool FolderRun, bool Silent, const std::functio
// ShellExecuteEx Win8.1+ wrongly opens symlinks in the separate console window
// Workaround: cmd /c Syslink.exe
string strParams;
if (IsWindows8Point1OrGreater())
if (seInfo.nShow == SW_SHOWNORMAL && !Info.NewWindow && IsWindows8Point1OrGreater())
{
if (seInfo.lpFile != nullptr && wcscmp(seInfo.lpVerb, L"open") == 0 && !strComspec.empty())
if (seInfo.lpFile && seInfo.lpVerb && wcscmp(seInfo.lpVerb, L"open") == 0 && !strComspec.empty())
{
if (seInfo.nShow == SW_SHOWNORMAL && !Info.NewWindow)
os::fs::file_status fstatus(seInfo.lpFile);
if (os::fs::is_file(fstatus) && fstatus.check(FILE_ATTRIBUTE_REPARSE_POINT))
{
os::fs::file_status fstatus(seInfo.lpFile);
if (os::fs::is_file(fstatus) && fstatus.check(FILE_ATTRIBUTE_REPARSE_POINT))
{
string fname(seInfo.lpFile);
strParams = ComSpecParams + L" " + QuoteSpace(fname);
if (seInfo.lpParameters && seInfo.lpParameters[0])
strParams += string(L" ") + seInfo.lpParameters;
string fname(seInfo.lpFile);
strParams = ComSpecParams + L" " + QuoteSpace(fname);
if (seInfo.lpParameters && seInfo.lpParameters[0])
strParams += string(L" ") + seInfo.lpParameters;

seInfo.lpFile = strComspec.data();
seInfo.lpParameters = strParams.data();
}
seInfo.lpFile = strComspec.data();
seInfo.lpParameters = strParams.data();
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4537)m4_dnl
m4_define(BUILD,4538)m4_dnl

0 comments on commit 1256596

Please sign in to comment.