desktop/source/lib/init.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit de6b66f2d9572480bce038b2a03e9ca5b1730b9f
Author:     Szymon Kłos <[email protected]>
AuthorDate: Thu Nov 30 15:36:57 2023 +0100
Commit:     Szymon Kłos <[email protected]>
CommitDate: Thu Nov 30 19:54:01 2023 +0100

    lok: import Work path from LOK_WORKDIR
    
    Change-Id: If0c9727f53c1c4dfb78d1ccbd6b3ff602268bbf7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160156
    Reviewed-by: Michael Meeks <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 3c658388306a..9a640bc5f2c4 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -8000,6 +8000,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

Reply via email to