summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@collabora.com>2018-03-14 17:12:57 +0000
committerMichael Meeks <michael.meeks@collabora.com>2018-03-14 19:51:34 +0100
commit005abf983d34042a7ced46d886f8ef2250cb3fce (patch)
tree609bcebae5bf559ac01ff7a869574e6ac54d90dd /desktop/source
parent6a9326803c01f4c9bc7da855053ce4e80646fad8 (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>
Diffstat (limited to 'desktop/source')
-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 d0978b449937..44d07125835a 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>
@@ -3805,6 +3806,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");
RequestHandler::Enable(false);
SAL_INFO("lok", "Starting soffice_main");