1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

let copy of settings file occur on a clean install.

This commit is contained in:
Dave Conway-Jones 2017-01-11 10:12:29 +00:00
parent 28678acf74
commit a55027b838

3
red.js
View File

@ -70,6 +70,7 @@ if (parsedArgs.help) {
console.log("Documentation can be found at http://nodered.org");
process.exit();
}
if (parsedArgs.argv.remain.length > 0) {
flowFile = parsedArgs.argv.remain[0];
}
@ -93,7 +94,7 @@ if (parsedArgs.settings) {
} else {
var defaultSettings = path.join(__dirname,"settings.js");
var settingsStat = fs.statSync(defaultSettings);
if (settingsStat.mtime.getTime() < settingsStat.ctime.getTime()) {
if (settingsStat.mtime.getTime() <= settingsStat.ctime.getTime()) {
// Default settings file has not been modified - safe to copy
fs.copySync(defaultSettings,userSettingsFile);
settingsFile = userSettingsFile;