summaryrefslogtreecommitdiff
path: root/zen/shell_execute.h
diff options
context:
space:
mode:
authorDaniel Wilhelm <daniel@wili.li>2016-05-24 22:10:57 +0200
committerDaniel Wilhelm <daniel@wili.li>2016-05-24 22:10:57 +0200
commit9043b32bb1835628c5a1d8be4a271c848443c629 (patch)
tree98ccb4936562731d9cae02a486441dfd446e8a4e /zen/shell_execute.h
parent8.0 (diff)
downloadFreeFileSync-9043b32bb1835628c5a1d8be4a271c848443c629.tar.gz
FreeFileSync-9043b32bb1835628c5a1d8be4a271c848443c629.tar.bz2
FreeFileSync-9043b32bb1835628c5a1d8be4a271c848443c629.zip
8.1
Diffstat (limited to 'zen/shell_execute.h')
-rw-r--r--zen/shell_execute.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/zen/shell_execute.h b/zen/shell_execute.h
index e6dcf7f5..060ba84d 100644
--- a/zen/shell_execute.h
+++ b/zen/shell_execute.h
@@ -82,14 +82,14 @@ void shellExecute(const Zstring& command, ExecutionType type) //throw FileError
trim(commandTmp, true, false); //CommandLineToArgvW() does not like leading spaces
std::vector<Zstring> argv;
- {
- int argc = 0;
- LPWSTR* tmp = ::CommandLineToArgvW(commandTmp.c_str(), &argc);
- if (!tmp)
- THROW_LAST_FILE_ERROR(_("Incorrect command line:") + L"\n" + commandTmp.c_str(), L"CommandLineToArgvW");
+ {
+ int argc = 0;
+ LPWSTR* tmp = ::CommandLineToArgvW(commandTmp.c_str(), &argc);
+ if (!tmp)
+ THROW_LAST_FILE_ERROR(_("Incorrect command line:") + L"\n" + commandTmp.c_str(), L"CommandLineToArgvW");
ZEN_ON_SCOPE_EXIT(::LocalFree(tmp));
std::copy(tmp, tmp + argc, std::back_inserter(argv));
- }
+ }
Zstring filepath;
Zstring arguments;
bgstack15