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:
parent
ffa65afbb2
commit
376db60acc
7
red.js
7
red.js
@ -106,8 +106,11 @@ if (parsedArgs.settings) {
|
|||||||
settingsFile = userSettingsFile;
|
settingsFile = userSettingsFile;
|
||||||
}
|
}
|
||||||
catch (err) {
|
catch (err) {
|
||||||
console.log("Can't copy settings file. Is file system Read Only ?");
|
console.log("Failed to copy settings file to "+userSettingsFile);
|
||||||
console.log("You may want to set readOnly: true, in settings.js");
|
console.log("Error: "+err.toString());
|
||||||
|
if (err.code == "EACCES") {
|
||||||
|
console.log("You may need to set readOnly: true, in settings.js");
|
||||||
|
}
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -142,7 +142,7 @@
|
|||||||
"restore": "Restoring __type__ file backup : __path__",
|
"restore": "Restoring __type__ file backup : __path__",
|
||||||
"restore-fail": "Restoring __type__ file backup failed : __message__",
|
"restore-fail": "Restoring __type__ file backup failed : __message__",
|
||||||
"fsync-fail": "Flushing file __path__ to disk 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": {
|
"projects": {
|
||||||
"changing-project": "Setting active project : __project__",
|
"changing-project": "Setting active project : __project__",
|
||||||
"active-project": "Active project : __project__",
|
"active-project": "Active project : __project__",
|
||||||
|
@ -84,7 +84,7 @@ module.exports = {
|
|||||||
try {
|
try {
|
||||||
fs.renameSync(path,backupPath);
|
fs.renameSync(path,backupPath);
|
||||||
} catch(e) {
|
} catch(e) {
|
||||||
log.warn(log._("storage.localfilesystem.fwrite-fail",{path:path}));
|
log.warn(log._("storage.localfilesystem.fwrite-fail",{path:path, message:e.toString()}));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user