diff options
author | Daniel Wilhelm <shieldwed@outlook.com> | 2017-01-08 18:21:23 +0100 |
---|---|---|
committer | Daniel Wilhelm <shieldwed@outlook.com> | 2017-01-08 18:21:23 +0100 |
commit | fe660cdff59aa3a939479ed60172e5c0803552b2 (patch) | |
tree | 045cf295b79de10f75ed6362c5836db25c9fc63a /zen/shell_execute.h | |
parent | 8.6 (diff) | |
download | FreeFileSync-fe660cdff59aa3a939479ed60172e5c0803552b2.tar.gz FreeFileSync-fe660cdff59aa3a939479ed60172e5c0803552b2.tar.bz2 FreeFileSync-fe660cdff59aa3a939479ed60172e5c0803552b2.zip |
8.7
Diffstat (limited to 'zen/shell_execute.h')
-rw-r--r-- | zen/shell_execute.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/zen/shell_execute.h b/zen/shell_execute.h index ee8203c3..2f73fc38 100644 --- a/zen/shell_execute.h +++ b/zen/shell_execute.h @@ -38,7 +38,7 @@ bool shellExecuteImpl(Function fillExecInfo, ExecutionType type) SHELLEXECUTEINFO execInfo = {}; execInfo.cbSize = sizeof(execInfo); execInfo.lpVerb = nullptr; - execInfo.nShow = SW_SHOWNORMAL; + execInfo.nShow = SW_SHOW; execInfo.fMask = type == EXEC_TYPE_SYNC ? (SEE_MASK_NOCLOSEPROCESS | SEE_MASK_NOASYNC) : 0; //don't use SEE_MASK_ASYNCOK -> different async mode than the default which returns successful despite errors! execInfo.fMask |= SEE_MASK_FLAG_NO_UI; //::ShellExecuteEx() shows a non-blocking pop-up dialog on errors -> we want a blocking one @@ -98,7 +98,7 @@ void shellExecute(const Zstring& command, ExecutionType type) //throw FileError { filePath = argv[0]; for (auto it = argv.begin() + 1; it != argv.end(); ++it) - arguments += (it != argv.begin() ? L" " : L"") + + arguments += (it == argv.begin() + 1 ? L"" : L" ") + (it->empty() || std::any_of(it->begin(), it->end(), &isWhiteSpace<wchar_t>) ? L"\"" + *it + L"\"" : *it); } |