summaryrefslogtreecommitdiff
path: root/desktop/source/lib/init.cxx
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2018-03-14 17:12:57 +0000
committerAndras Timar <andras.timar@collabora.com>2018-03-27 12:22:58 +0200
commitbb3121094af3cf0a73c059ca7e37d4155e6ca087 (patch)
treec868b1c5d2d329c8e780b8f7524f3fce4f9d3eac /desktop/source/lib/init.cxx
parenta909a07f8da5695daa9d669090d61c9f5c5a8659 (diff)
Allow lok to re-set temporary paths on second init.
Change-Id: I40cd0538b573c2d090f56424e1110b938981a878 Reviewed-on: https://gerrit.libreoffice.org/51292 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit 005abf983d34042a7ced46d886f8ef2250cb3fce)
Diffstat (limited to 'desktop/source/lib/init.cxx')
-rw-r--r--desktop/source/lib/init.cxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index a9534de375e0..ef7e7574ce10 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -92,6 +92,7 @@
#include <unotools/configmgr.hxx>
#include <unotools/syslocaleoptions.hxx>
#include <unotools/mediadescriptor.hxx>
+#include <unotools/pathoptions.hxx>
#include <osl/module.hxx>
#include <comphelper/sequence.hxx>
#include <sfx2/sfxbasemodel.hxx>
@@ -3814,6 +3815,13 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
if (eStage != PRE_INIT)
{
+ SAL_INFO("lok", "Re-initialize temp paths");
+ SvtPathOptions aOptions;
+ OUString aNewTemp;
+ osl::FileBase::getTempDirURL(aNewTemp);
+ aOptions.SetTempPath(aNewTemp);
+ desktop::Desktop::CreateTemporaryDirectory();
+
SAL_INFO("lok", "Enabling RequestHandler");
#ifdef IOS
RequestHandler::Enable(true);