summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-09 15:41:03 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2017-08-13 17:55:34 +0200
commit1e7b9c6826f07b724b433e978b0f580460168752 (patch)
treed7e2a3fa1ad73d8b581ca8c8407e5781539572ea /desktop
parent25ac5330e84b5e8c55cd81c7fd0c84c8aa889d47 (diff)
updater: make sure we pass the correct path for the updater executable on win
Change-Id: Ia7655317582b891e109f3b310498264cc59a3924 Reviewed-on: https://gerrit.libreoffice.org/40923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/updater.cxx12
1 files changed, 7 insertions, 5 deletions
diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index 1ee55fcf3944..6c0206059a6a 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -275,33 +275,35 @@ bool update()
CopyUpdaterToTempDir(Updater::getExecutableDirURL(), aTempDirURL);
OUString aTempDirPath = getPathFromURL(aTempDirURL);
- OString aPath = OUStringToOString(aTempDirPath + "/" + OUString::fromUtf8(pUpdaterName), RTL_TEXTENCODING_UTF8);
+ OUString aUpdaterPath = aTempDirPath + "/" + OUString::fromUtf8(pUpdaterName);
Updater::log("Calling the updater with parameters: ");
CharT** pArgs = createCommandLine();
bool bSuccess = true;
-#if UNX
const char* pUpdaterTestReplace = std::getenv("LIBO_UPDATER_TEST_REPLACE");
if (!pUpdaterTestReplace)
{
+#if UNX
+ OString aPath = OUStringToOString(aUpdaterPath, RTL_TEXTENCODING_UTF8);
if (execv(aPath.getStr(), pArgs))
{
printf("execv failed with error %d %s\n",errno,strerror(errno));
bSuccess = false;
}
+#elif _WIN32
+ bSuccess = WinLaunchChild((wchar_t*)aUpdaterPath.getStr(), 8, pArgs);
+#endif
}
else
{
+ SAL_WARN("updater", "Executable Path:" << aUpdaterPath);
for (size_t i = 0; i < 8 + rtl_getAppCommandArgCount(); ++i)
{
SAL_WARN("desktop.updater", pArgs[i]);
}
bSuccess = false;
}
-#elif _WIN32
- bSuccess = WinLaunchChild(nullptr, 8, pArgs);
-#endif
for (size_t i = 0; i < 8 + rtl_getAppCommandArgCount(); ++i)
{