summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorPranav Kant <pranavk@collabora.co.uk>2017-10-03 11:48:34 +0530
committerpranavk <pranavk@collabora.co.uk>2017-10-03 09:39:59 +0200
commit9127d1a89cbfba89eb9df6755ea7b9e161cfc67a (patch)
tree724f2a1eefa67c664144473ae9aecc73a7922dc8 /framework
parent445b17ce332007a62cd1e4f6eac4d337896c68b2 (diff)
framework, lok: It's okay to have valid non-existent user inst. path
Change-Id: I3b9f00adb76fc702e1847d9fab866b7796cfd942 Reviewed-on: https://gerrit.libreoffice.org/43061 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/services/substitutepathvars.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index 4d87d98c3e89..d851deb0152e 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -19,6 +19,7 @@
#include <config_folders.h>
+#include <comphelper/lok.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/compbase.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -614,7 +615,10 @@ void SubstitutePathVariables::SetPredefinedPathVariables()
//Therefore we do not assert here.
// It's not possible to detect when an empty value would actually be used.
// (note: getenv is a hack to detect if we're running in a unit test)
- if (aState == ::utl::Bootstrap::PATH_EXISTS || getenv("SRC_ROOT")) {
+ // Also, it's okay to have an empty user installation path in case of LOK
+ if (aState == ::utl::Bootstrap::PATH_EXISTS || getenv("SRC_ROOT") ||
+ (comphelper::LibreOfficeKit::isActive() && aState == ::utl::Bootstrap::PATH_VALID))
+ {
m_aPreDefVars.m_FixedVar[ PREDEFVAR_USERPATH ] = sVal;
}