Merge pull request #4951 from node-red/move-location-of-new-creds-files

Move location of new creds files to be next to flows (if they don't exist already in userdir)
pull/5514/head
Nick O'Leary 2026-02-26 13:20:32 +00:00 committed by GitHub
commit cd9ff6d9b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -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;