Kaydet (Commit) 78437148 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

updater: forward the command line arguments to the updater

The arguments will then be used again to restart LibreOffice with the same arguments.

Change-Id: I17697c997a1dfeebecd9ec64e8f4ea66cadc4690
Reviewed-on: https://gerrit.libreoffice.org/39079Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 42a6c0d0
......@@ -25,6 +25,7 @@
#include <unotools/tempfile.hxx>
#include <unotools/configmgr.hxx>
#include <osl/file.hxx>
#include <rtl/process.h>
#include <curl/curl.h>
......@@ -140,7 +141,8 @@ char** createCommandLine()
OUString aInstallDir( "$BRAND_BASE_DIR/" );
rtl::Bootstrap::expandMacros(aInstallDir);
size_t nArgs = 8;
size_t nCommandLineArgs = rtl_getAppCommandArgCount();
size_t nArgs = 8 + nCommandLineArgs;
char** pArgs = new char*[nArgs];
{
createStr(pUpdaterName, pArgs, 0);
......@@ -183,6 +185,15 @@ char** createCommandLine()
OUString aSofficePath = getPathFromURL(aSofficePathURL);
createStr(aSofficePath, pArgs, 6);
}
// add the command line arguments from the soffice list
for (size_t i = 0; i < nCommandLineArgs; ++i)
{
OUString aCommandLineArg;
rtl_getAppCommandArg(i, &aCommandLineArg.pData);
createStr(aCommandLineArg, pArgs, 7 + i);
}
pArgs[nArgs - 1] = nullptr;
return pArgs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment