summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2023-11-30 15:36:57 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2024-01-02 13:00:33 +0100
commit21e58b94a2390a17571c30e91254f116d1566a2d (patch)
treeffe2cc72fb91cbdbeb2d5370aeee9929900dd606 /desktop
parentb72aa31d7db38c81f757206e4e51844b839797ea (diff)
lok: import Work path from LOK_WORKDIR
Change-Id: If0c9727f53c1c4dfb78d1ccbd6b3ff602268bbf7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160156 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161059 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'desktop')
-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 cc3139fcd22e..a54ebc6e469f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7977,6 +7977,14 @@ static int lo_initialize(LibreOfficeKit* pThis, const char* pAppPath, const char
OUString aNewTemp;
osl::FileBase::getTempDirURL(aNewTemp);
aOptions.SetTempPath(aNewTemp);
+ {
+ const char *pWorkPath = getenv("LOK_WORKDIR");
+ if (pWorkPath)
+ {
+ OString sWorkPath(pWorkPath);
+ aOptions.SetWorkPath(OStringToOUString(sWorkPath, RTL_TEXTENCODING_UTF8));
+ }
+ }
desktop::Desktop::CreateTemporaryDirectory();
// The RequestHandler is specifically set to be ready when all the other