From e17044d60ee66e4f940eb50eaa1b870dcfd83ee1 Mon Sep 17 00:00:00 2001 From: Joachim Schiele Date: Sun, 22 Jun 2014 20:56:21 +0200 Subject: [PATCH 1/2] added /abs/path/settings.json handling before this path, one could only supply a relative path like: --settings ../relative/path/settings.js now one can also use it with absolute paths like: --settings /abs/path/settings.json --- src/node/utils/Settings.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 8b17a6d3..f3005033 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -177,7 +177,11 @@ exports.abiwordAvailable = function() exports.reloadSettings = function reloadSettings() { // Discover where the settings file lives var settingsFilename = argv.settings || "settings.json"; - settingsFilename = path.resolve(path.join(exports.root, settingsFilename)); + + if (path.resolve(settingsFilename)===settingsFilename) + settingsFilename = path.resolve(settingsFilename); + else + settingsFilename = path.resolve(path.join(exports.root, settingsFilename)); var settingsStr; try{ From 63b89b693d4d5c30abe71a2b9a87a80572a4d20f Mon Sep 17 00:00:00 2001 From: Joachim Schiele Date: Thu, 24 Jul 2014 12:06:52 +0200 Subject: [PATCH 2/2] Update Settings.js added brackets to match etherpad lite devs' coding style --- src/node/utils/Settings.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index f3005033..c455617b 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -178,11 +178,12 @@ exports.reloadSettings = function reloadSettings() { // Discover where the settings file lives var settingsFilename = argv.settings || "settings.json"; - if (path.resolve(settingsFilename)===settingsFilename) + if (path.resolve(settingsFilename)===settingsFilename) { settingsFilename = path.resolve(settingsFilename); - else + } else { settingsFilename = path.resolve(path.join(exports.root, settingsFilename)); - + } + var settingsStr; try{ //read the settings sync