From 1b938a7a40a7dee00b3566fb9e47b8427523ac91 Mon Sep 17 00:00:00 2001 From: muxator Date: Wed, 22 Aug 2018 00:47:47 +0200 Subject: [PATCH] settings: compute exports.root via AbsolutePaths.findEtherpadRoot() First steps for fixing #3466. --- src/node/utils/Settings.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node/utils/Settings.js b/src/node/utils/Settings.js index 4168ea82..64ea9bf1 100644 --- a/src/node/utils/Settings.js +++ b/src/node/utils/Settings.js @@ -19,6 +19,7 @@ * limitations under the License. */ +var absolutePaths = require('./AbsolutePaths'); var fs = require("fs"); var os = require("os"); var path = require('path'); @@ -31,7 +32,8 @@ var suppressDisableMsg = " -- To suppress these warning messages change suppress var _ = require("underscore"); /* Root path of the installation */ -exports.root = path.normalize(path.join(npm.dir, "..")); +exports.root = absolutePaths.findEtherpadRoot(); +console.log(`All relative paths will be interpreted relative to the identified Etherpad base dir: ${exports.root}`); /** * The app title, visible e.g. in the browser window