summaryrefslogtreecommitdiff
path: root/zen/shell_execute.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2015-10-02 14:52:04 +0200
committerDaniel Wilhelm <daniel@wili.li>2015-10-02 14:52:04 +0200
commit1845c028b8cb8496d1d78f0da738120e1c31401a (patch)
treeadf9fb436aea09be367aef8ed3b6cdbf6a46e34c /zen/shell_execute.h
parent6.7 (diff)
downloadFreeFileSync-1845c028b8cb8496d1d78f0da738120e1c31401a.tar.gz
FreeFileSync-1845c028b8cb8496d1d78f0da738120e1c31401a.tar.bz2
FreeFileSync-1845c028b8cb8496d1d78f0da738120e1c31401a.zip
6.8
Diffstat (limited to 'zen/shell_execute.h')
-rw-r--r--zen/shell_execute.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/zen/shell_execute.h b/zen/shell_execute.h
index 78526b70..9f99315a 100644
--- a/zen/shell_execute.h
+++ b/zen/shell_execute.h
@@ -46,11 +46,11 @@ void shellExecute2(const Zstring& command, ExecutionType type) //throw FileError
std::copy(tmp, tmp + argc, std::back_inserter(argv));
}
- Zstring filename;
+ Zstring filepath;
Zstring arguments;
if (!argv.empty())
{
- filename = argv[0];
+ filepath = argv[0];
for (auto iter = argv.begin() + 1; iter != argv.end(); ++iter)
arguments += (iter != argv.begin() ? L" " : L"") +
(iter->empty() || std::any_of(iter->begin(), iter->end(), &isWhiteSpace<wchar_t>) ? L"\"" + *iter + L"\"" : *iter);
@@ -63,12 +63,12 @@ void shellExecute2(const Zstring& command, ExecutionType type) //throw FileError
execInfo.fMask = type == EXEC_TYPE_SYNC ? (SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_DDEWAIT) : 0; //don't use SEE_MASK_ASYNCOK -> returns successful despite errors!
execInfo.fMask |= SEE_MASK_UNICODE | SEE_MASK_FLAG_NO_UI; //::ShellExecuteEx() shows a non-blocking pop-up dialog on errors -> we want a blocking one
execInfo.lpVerb = nullptr;
- execInfo.lpFile = filename.c_str();
+ execInfo.lpFile = filepath.c_str();
execInfo.lpParameters = arguments.c_str();
execInfo.nShow = SW_SHOWNORMAL;
if (!::ShellExecuteEx(&execInfo)) //__inout LPSHELLEXECUTEINFO lpExecInfo
- throwFileError(_("Incorrect command line:") + L"\nFile: " + filename + L"\nArg: " + arguments, L"ShellExecuteEx", ::GetLastError());
+ throwFileError(_("Incorrect command line:") + L"\nFile: " + filepath + L"\nArg: " + arguments, L"ShellExecuteEx", ::GetLastError());
if (execInfo.hProcess)
{
bgstack15