summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2018-10-12 03:36:32 +0300
committerMichael Meeks <michael.meeks@collabora.com>2018-10-30 17:00:48 +0000
commitafb2a51dad3b30844dccde2b647c2927499bc104 (patch)
treee6952a52f989e455d8491a1c959f226c75ade2a0 /desktop
parent87201719c61e48aac5ae70d58cc51b994792dfec (diff)
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 (cherry picked from commit a68bf798532c93c1fef8def82fe049ca55b5cb33) Signed-off-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/userinstall.cxx9
1 files changed, 8 insertions, 1 deletions
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());