diff --git a/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js b/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js index ca87d76e9..b19889bcb 100644 --- a/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js +++ b/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/index.js @@ -85,7 +85,10 @@ function init(_settings, _runtime) { var ffBase = fspath.basename(flowsFullPath,ffExt); flowsFileBackup = getBackupFilename(flowsFullPath); - credentialsFile = fspath.join(settings.userDir,ffBase+"_cred"+ffExt); + credentialsFile = fspath.join(settings.userDir,ffBase+"_cred"+ffExt); // if creds file exists in "old" location userdir then use it + if (!fs.existsSync(credentialsFile)) { // if not then locate it next to flows file in flows dir + credentialsFile = fspath.join(fspath.dirname(flowsFullPath), ffBase+"_cred"+ffExt); + } credentialsFileBackup = getBackupFilename(credentialsFile) var setupProjectsPromise;