From 7c62b4c7afcea297abfceaafd00b6a59c1bc1dab Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Mon, 22 Aug 2011 19:17:35 +0100 Subject: [PATCH] Fix argv[0] not being correctly set to binary path under Windows Add the executable to the start of the command line for the new process in ProcessUtils::runAsync() --- src/ProcessUtils.cpp | 2 +- src/UpdaterOptions.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ProcessUtils.cpp b/src/ProcessUtils.cpp index 41b1a6b..280fb0c 100644 --- a/src/ProcessUtils.cpp +++ b/src/ProcessUtils.cpp @@ -310,7 +310,7 @@ int ProcessUtils::runAsyncUnix(const std::string& executable, void ProcessUtils::runAsyncWindows(const std::string& executable, const std::list& args) { - std::string commandLine; + std::string commandLine = executable; for (std::list::const_iterator iter = args.begin(); iter != args.end(); iter++) { if (!commandLine.empty()) diff --git a/src/UpdaterOptions.cpp b/src/UpdaterOptions.cpp index 80fb196..996e3a4 100644 --- a/src/UpdaterOptions.cpp +++ b/src/UpdaterOptions.cpp @@ -3,6 +3,7 @@ #include "Log.h" #include "AnyOption/anyoption.h" #include "Platform.h" +#include "StringUtils.h" #include #include