desktop/source/app/updater.cxx | 14 ++++---------- desktop/source/app/updater.hxx | 1 - 2 files changed, 4 insertions(+), 11 deletions(-)
New commits: commit b01f7e8f4b931f56a55d5bfc661f7bb7416afa58 Author: Stephan Bergmann <stephan.bergm...@allotropia.de> AuthorDate: Thu May 30 13:44:49 2024 +0200 Commit: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> CommitDate: Mon Jun 3 20:17:10 2024 +0200 Make sure updates dir exists when writing updating.log Change-Id: Ib652fedde970d01b701ad4b61e75028cd43974f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168258 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergm...@allotropia.de> (cherry picked from commit 48190a8f3783135c65538977cd38f34ba733f071) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168297 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> (cherry picked from commit 44d8490f615cd6c56a1336d6d4da10219f572ccb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168382 Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> diff --git a/desktop/source/app/updater.cxx b/desktop/source/app/updater.cxx index 12bb4969a68c..aed765d6eb3d 100644 --- a/desktop/source/app/updater.cxx +++ b/desktop/source/app/updater.cxx @@ -803,14 +803,6 @@ void update_checker() } } -OUString Updater::getUpdateInfoLog() -{ - OUString aUpdateInfoURL("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/updates/updating.log"); - rtl::Bootstrap::expandMacros(aUpdateInfoURL); - - return aUpdateInfoURL; -} - OUString Updater::getPatchDirURL() { OUString aPatchDirURL("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/updates/0/"); @@ -843,8 +835,10 @@ OUString Updater::getExecutableDirURL() void Updater::log(const OUString& rMessage) { SAL_INFO("desktop.updater", rMessage); - OUString aUpdateLog = getUpdateInfoLog(); - SvFileStream aLog(aUpdateLog, StreamMode::STD_READWRITE); + OUString dir("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/updates"); + rtl::Bootstrap::expandMacros(dir); + osl::Directory::create(dir); + SvFileStream aLog(dir + "/updating.log", StreamMode::STD_READWRITE); aLog.Seek(aLog.Tell() + aLog.remainingSize()); // make sure we are at the end aLog.WriteLine(OUStringToOString(rMessage, RTL_TEXTENCODING_UTF8)); } diff --git a/desktop/source/app/updater.hxx b/desktop/source/app/updater.hxx index 7f1ea920fbe9..8989f1f684a0 100644 --- a/desktop/source/app/updater.hxx +++ b/desktop/source/app/updater.hxx @@ -18,7 +18,6 @@ void update_checker(); class Updater { public: - static OUString getUpdateInfoLog(); static OUString getPatchDirURL(); static OUString getUpdateFileURL(); static OUString getExecutableDirURL();