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

fix error messages for readonly

This commit is contained in:
Dave Conway-Jones 2018-08-30 09:32:50 +01:00
parent ffa65afbb2
commit 376db60acc
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
3 changed files with 7 additions and 4 deletions

7
red.js
View File

@ -106,8 +106,11 @@ if (parsedArgs.settings) {
settingsFile = userSettingsFile;
}
catch (err) {
console.log("Can't copy settings file. Is file system Read Only ?");
console.log("You may want to set readOnly: true, in settings.js");
console.log("Failed to copy settings file to "+userSettingsFile);
console.log("Error: "+err.toString());
if (err.code == "EACCES") {
console.log("You may need to set readOnly: true, in settings.js");
}
process.exit(1);
}
} else {

View File

@ -142,7 +142,7 @@
"restore": "Restoring __type__ file backup : __path__",
"restore-fail": "Restoring __type__ file backup failed : __message__",
"fsync-fail": "Flushing file __path__ to disk failed : __message__",
"fwrite-fail": "Writing backup file __path__ to disk failed.",
"fwrite-fail": "Writing backup file __path__ to disk failed : __message__",
"projects": {
"changing-project": "Setting active project : __project__",
"active-project": "Active project : __project__",

View File

@ -84,7 +84,7 @@ module.exports = {
try {
fs.renameSync(path,backupPath);
} catch(e) {
log.warn(log._("storage.localfilesystem.fwrite-fail",{path:path}));
log.warn(log._("storage.localfilesystem.fwrite-fail",{path:path, message:e.toString()}));
}
}
}