diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-08-22 16:25:45 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2017-05-19 03:43:18 +0200 |
commit | cf6e88f4a8a5b159dafa83c40fc642038ec54c52 (patch) | |
tree | 13b6d68ddd591b428a3c2a22dca7e493269bfb15 | |
parent | dd59845107509d8e7f0caf99d3c1fc142d83d4ca (diff) |
don't run the updates when the updater has been disabled
Change-Id: I9cf046d94ec0db2af965380f6e0935f0193e427d
-rw-r--r-- | desktop/source/app/app.cxx | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 735266586666..7b797d077755 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -92,6 +92,7 @@ #include <unotools/localfilehelper.hxx> #include <officecfg/Office/Common.hxx> #include <officecfg/Office/Recovery.hxx> +#include <officecfg/Office/Update.hxx> #include <officecfg/Setup.hxx> #include <osl/file.hxx> #include <osl/process.h> @@ -1451,17 +1452,21 @@ int Desktop::Main() if ( !InitializeConfiguration() ) return EXIT_FAILURE; - OUString aInstallationDir( "$BRAND_BASE_DIR/" LIBO_LIBEXEC_FOLDER ); + if (officecfg::Office::Update::Update::Enabled::get()) + { - CreateValidUpdateDir(aInstallationDir); + OUString aInstallationDir( "$BRAND_BASE_DIR/" LIBO_LIBEXEC_FOLDER ); - osl::DirectoryItem aDirectoryItem; - osl::DirectoryItem::get("file:///lo/users/moggi/test-inst/updated"/*aInstallationDir + "/updated"*/, aDirectoryItem); - bool bValidUpdateDirExists = aDirectoryItem.is(); - if (bValidUpdateDirExists) - { - rtl::Bootstrap::expandMacros(aInstallationDir); - Update(aInstallationDir); + CreateValidUpdateDir(aInstallationDir); + + osl::DirectoryItem aDirectoryItem; + osl::DirectoryItem::get("file:///lo/users/moggi/test-inst/updated"/*aInstallationDir + "/updated"*/, aDirectoryItem); + bool bValidUpdateDirExists = aDirectoryItem.is(); + if (bValidUpdateDirExists) + { + rtl::Bootstrap::expandMacros(aInstallationDir); + Update(aInstallationDir); + } } SetSplashScreenProgress(30); |