[Libreoffice-commits] core.git: desktop/source

Markus Mohrhard markus.mohrhard at googlemail.com
Mon Jun 12 07:51:18 UTC 2017


 desktop/source/app/updater.cxx |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 476cc2085ff1cecb47639052750034fc49af3fcc
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Jun 12 01:24:25 2017 +0200

    use the shared path code
    
    Change-Id: I02cc24d7a9e3b679a7bd883cd7085682063520ee
    Reviewed-on: https://gerrit.libreoffice.org/38681
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx
index 1dac58923a3c..118c3981815f 100644
--- a/desktop/source/app/updater.cxx
+++ b/desktop/source/app/updater.cxx
@@ -243,15 +243,11 @@ void CreateValidUpdateDir(const update_info& update_info)
     OUString aInstallDir("$BRAND_BASE_DIR");
     rtl::Bootstrap::expandMacros(aInstallDir);
     OUString aInstallPath = getPathFromURL(aInstallDir);
-    OUString aUpdatedBuildDir("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/update_dir/");
-    rtl::Bootstrap::expandMacros(aUpdatedBuildDir);
-    OUString aWorkdirPath = getPathFromURL(aUpdatedBuildDir);
+    OUString aWorkdirPath = getPathFromURL(Updater::getUpdateDirURL());
 
-    OUString aPatchDirURL("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/patch/");
-    rtl::Bootstrap::expandMacros(aPatchDirURL);
-    OUString aPatchDir = getPathFromURL(aPatchDirURL);
+    OUString aPatchDir = getPathFromURL(Updater::getPatchDirURL());
 
-    OUString aUpdaterPath = getPathFromURL(aInstallDir + "/program/" + OUString::fromUtf8(pUpdaterName));
+    OUString aUpdaterPath = getPathFromURL(Updater::getExecutableDirURL() + OUString::fromUtf8(pUpdaterName));
 
     OUString aCommand = aUpdaterPath + " " + aPatchDir + " " + aInstallPath + " " + aWorkdirPath + " -1";
 
@@ -266,7 +262,7 @@ void CreateValidUpdateDir(const update_info& update_info)
     }
     else
     {
-        OUString aUpdateInfoURL(aPatchDirURL + "/update.info");
+        OUString aUpdateInfoURL(Updater::getPatchDirURL() + "/update.info");
         OUString aUpdateInfoPath = getPathFromURL(aUpdateInfoURL);
         SvFileStream aUpdateInfoFile(aUpdateInfoPath, StreamMode::WRITE | StreamMode::TRUNC);
         aUpdateInfoFile.WriteCharPtr("[UpdateInfo]\nOldBuildId=");


More information about the Libreoffice-commits mailing list