summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/app/updater.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index 5596028b0f79..fa3836596cc3 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -165,7 +165,7 @@ void createStr(const OUString& rStr, CharT** pArgs, size_t i)
pArgs[i] = pStr;
}
-CharT** createCommandLine()
+CharT** createCommandLine(int * argc)
{
OUString aInstallDir = Updater::getInstallationPath();
@@ -231,6 +231,7 @@ CharT** createCommandLine()
pArgs[nArgs - 1] = nullptr;
+ *argc = nArgs - 1;
return pArgs;
}
@@ -297,7 +298,8 @@ bool update()
OUString aUpdaterPath = getPathFromURL(aTempDirURL + "/" + OUString::fromUtf8(pUpdaterName));
Updater::log("Calling the updater with parameters: ");
- CharT** pArgs = createCommandLine();
+ int argc;
+ CharT** pArgs = createCommandLine(&argc);
bool bSuccess = true;
const char* pUpdaterTestReplace = std::getenv("LIBO_UPDATER_TEST_REPLACE");
@@ -311,7 +313,7 @@ bool update()
bSuccess = false;
}
#elif defined(_WIN32)
- bSuccess = WinLaunchChild((wchar_t*)aUpdaterPath.getStr(), 8, pArgs);
+ bSuccess = WinLaunchChild((wchar_t*)aUpdaterPath.getStr(), argc, pArgs);
#endif
}
else