[Libreoffice-commits] core.git: desktop/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Oct 12 00:56:18 UTC 2018
desktop/source/app/userinstall.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit a68bf798532c93c1fef8def82fe049ca55b5cb33
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Fri Oct 12 03:36:32 2018 +0300
Commit: Tor Lillqvist <tml at iki.fi>
CommitDate: Fri Oct 12 03:54:41 2018 +0300
Make sure the UserInstallation/user directory exists on iOS (and Android)
If it doesn't exist lots of things go very badly. Took a while for me
to understand the mechanism, sigh.
Change-Id: I40300587a5f422876cbda68c5aa98a23ed707135
diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx
index bec53d861d59..d748a948c585 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -1,4 +1,4 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
/*
* This file is part of the LibreOffice project.
*
@@ -27,6 +27,7 @@
#include <officecfg/Setup.hxx>
#include <osl/file.h>
#include <osl/file.hxx>
+#include <rtl/bootstrap.hxx>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include <unotools/bootstrap.hxx>
@@ -128,6 +129,12 @@ Status create(OUString const & uri) {
default:
return ERROR_OTHER;
}
+#else
+ // On (Android and) iOS, just create the user directory. Later code fails mysteriously if it
+ // doesn't exist.
+ OUString userDir("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("bootstrap") ":UserInstallation}/user");
+ rtl::Bootstrap::expandMacros(userDir);
+ osl::Directory::createPath(userDir);
#endif
std::shared_ptr<comphelper::ConfigurationChanges> batch(
comphelper::ConfigurationChanges::create());
More information about the Libreoffice-commits
mailing list