mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Fix flow backup for first run, add tests
This commit is contained in:
@@ -178,7 +178,9 @@ var localfilesystem = {
|
||||
},
|
||||
|
||||
saveFlows: function(flows) {
|
||||
fs.renameSync(flowsFullPath,flowsPrev);
|
||||
if (fs.existsSync(flowsFullPath)) {
|
||||
fs.renameSync(flowsFullPath,flowsPrev);
|
||||
}
|
||||
return nodeFn.call(fs.writeFile, flowsFullPath, JSON.stringify(flows));
|
||||
},
|
||||
|
||||
|
Reference in New Issue
Block a user