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

change preferred name of backup file to flows.backup

(even if it is the previous version :-)
relates to Issue #184
This commit is contained in:
Dave C-J 2014-05-06 16:02:18 +01:00
parent 67d1e2acd8
commit d1318d215c
2 changed files with 3 additions and 3 deletions

2
.gitignore vendored
View File

@ -1,7 +1,7 @@
node_modules node_modules
credentials.json credentials.json
flows*.json flows*.json
flow.backup flows.backup
*_cred* *_cred*
nodes/node-red-nodes/ nodes/node-red-nodes/
.npm .npm

View File

@ -153,7 +153,7 @@ var localfilesystem = {
var fsext = fspath.extname(flowsFile); var fsext = fspath.extname(flowsFile);
credentialsFile = fspath.join(userDir,fspath.basename(flowsFile,fsext)+"_cred"+fsext); credentialsFile = fspath.join(userDir,fspath.basename(flowsFile,fsext)+"_cred"+fsext);
oldCredentialsFile = fspath.join(userDir,"credentials.json"); oldCredentialsFile = fspath.join(userDir,"credentials.json");
flowsPrev = fspath.join(userDir,"flow.backup"); flowsPrev = fspath.join(userDir,"flows.backup");
libDir = fspath.join(userDir,"lib"); libDir = fspath.join(userDir,"lib");
libFlowsDir = fspath.join(libDir,"flows"); libFlowsDir = fspath.join(libDir,"flows");
@ -178,7 +178,7 @@ var localfilesystem = {
}, },
saveFlows: function(flows) { saveFlows: function(flows) {
fs.rename(flowsFullPath,flowsPrev); fs.renameSync(flowsFullPath,flowsPrev);
return nodeFn.call(fs.writeFile, flowsFullPath, JSON.stringify(flows)); return nodeFn.call(fs.writeFile, flowsFullPath, JSON.stringify(flows));
}, },