mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
If creds dont exist - create in flows dir rather than userdir
So they stay alongside flows
This commit is contained in:
parent
1d9586721e
commit
fd4f747706
@ -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 use
|
||||
if (!fs.existsSync(credentialsFile)) { // if not then locate it next to flows file in user dir
|
||||
credentialsFile = fspath.join(fspath.dirname(flowsFullPath), ffBase+"_cred"+ffExt);
|
||||
}
|
||||
credentialsFileBackup = getBackupFilename(credentialsFile)
|
||||
|
||||
var setupProjectsPromise;
|
||||
|
Loading…
x
Reference in New Issue
Block a user