Skip to content

Node.js based forum software built for the modern web

Allow absolute config paths

Ian Forsey6ca5a4293670
diff --git a/app.js b/app.js
index 1836539edc..d66e81f137 100644
--- a/app.js
+++ b/app.js
@@ -66,7 +66,7 @@ winston.info('');
var configFile = __dirname + '/config.json',
configExists;
if (nconf.get('config')) {
- configFile = path.join(__dirname, nconf.get('config'));
+ configFile = path.resolve(__dirname, nconf.get('config'));
}
configExists = fs.existsSync(configFile);
diff --git a/src/install.js b/src/install.js
index 94e22f2582..55fe8053bf 100644
--- a/src/install.js
+++ b/src/install.js
@@ -445,7 +445,7 @@ var async = require('async'),
save: function (server_conf, callback) {
var serverConfigPath = path.join(__dirname, '../config.json');
if (nconf.get('config')) {
- serverConfigPath = path.join(__dirname, '../', nconf.get('config'));
+ serverConfigPath = path.resolve(__dirname, '../', nconf.get('config'));
}
fs.writeFile(serverConfigPath, JSON.stringify(server_conf, null, 4), function (err) {