From e17044d60ee66e4f940eb50eaa1b870dcfd83ee1 Mon Sep 17 00:00:00 2001 From: Joachim Schiele Date: Sun, 22 Jun 2014 20:56:21 +0200 Subject: [PATCH] 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 8b17a6d34..f30050337 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{