[Libreoffice-commits] online.git: wsd/LOOLWSD.cpp
Jan Holesovsky (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 30 13:01:16 UTC 2020
wsd/LOOLWSD.cpp | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
New commits:
commit 4669934a263b40512988626b8f251264cb6f6d69
Author: Jan Holesovsky <kendy at collabora.com>
AuthorDate: Thu Apr 30 10:34:23 2020 +0200
Commit: Jan Holesovsky <kendy at collabora.com>
CommitDate: Thu Apr 30 15:00:58 2020 +0200
Allow overriding the lo-template-path with a command line switch.
This was completely removed in commit
db176ee45baae93ab4411c23d32ae1d0f608352b from good reasons - it is
really bad to have that in the config file, the Online and Core versions
are tightly coupled.
Having said that, the possibility to override still has its use cases,
so let's introduce a command line switch for those who need it & know
what they are doing.
Change-Id: I76875f7c7a174fbc16985299eb968a41814b7962
Reviewed-on: https://gerrit.libreoffice.org/c/online/+/93196
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Jan Holesovsky <kendy at collabora.com>
diff --git a/wsd/LOOLWSD.cpp b/wsd/LOOLWSD.cpp
index 6ef3f2c84..f4812ff30 100644
--- a/wsd/LOOLWSD.cpp
+++ b/wsd/LOOLWSD.cpp
@@ -715,7 +715,7 @@ bool LOOLWSD::DummyLOK = false;
std::string LOOLWSD::FuzzFileName;
#endif
std::string LOOLWSD::SysTemplate;
-std::string LOOLWSD::LoTemplate;
+std::string LOOLWSD::LoTemplate = LO_PATH;
std::string LOOLWSD::ChildRoot;
std::string LOOLWSD::ServerName;
std::string LOOLWSD::FileServerRoot;
@@ -1145,7 +1145,6 @@ void LOOLWSD::initialize(Application& self)
#endif
SysTemplate = getPathFromConfig("sys_template_path");
- LoTemplate = LO_PATH;
ChildRoot = getPathFromConfig("child_root_path");
ServerName = config().getString("server_name");
@@ -1441,6 +1440,11 @@ void LOOLWSD::defineOptions(OptionSet& optionSet)
.repeatable(false)
.argument("path"));
+ optionSet.addOption(Option("lo-template-path", "", "Override the LOK core installation directory path.")
+ .required(false)
+ .repeatable(false)
+ .argument("path"));
+
#if ENABLE_DEBUG
optionSet.addOption(Option("unitlib", "", "Unit testing library path.")
.required(false)
@@ -1499,6 +1503,8 @@ void LOOLWSD::handleOption(const std::string& optionName,
ConfigFile = value;
else if (optionName == "config-dir")
ConfigDir = value;
+ else if (optionName == "lo-template-path")
+ LoTemplate = value;
#if ENABLE_DEBUG
else if (optionName == "unitlib")
UnitTestLibrary = value;
More information about the Libreoffice-commits
mailing list