Allow absolute config paths

v1.18.x
Ian Forsey 11 years ago
parent 2b2e83992e
commit 6ca5a42936

@ -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);

@ -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) {

Loading…
Cancel
Save