diff --git a/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/Project.js b/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/Project.js index 060a71227..e10325b58 100644 --- a/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/Project.js +++ b/packages/node_modules/@node-red/runtime/lib/storage/localfilesystem/projects/Project.js @@ -1048,6 +1048,11 @@ function init(_settings, _runtime) { settings = _settings; runtime = _runtime; projectsDir = fspath.join(settings.userDir,"projects"); + + if(settings.editorTheme.projects.path) { + projectsDir = settings.editorTheme.projects.path; + } + authCache.init(); } 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 8ddd61232..6c1228c6c 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 @@ -114,6 +114,11 @@ function init(_settings, _runtime) { Projects.init(settings,runtime); sshTools.init(settings); projectsDir = fspath.join(settings.userDir,"projects"); + + if(settings.editorTheme.projects.path) { + projectsDir = settings.editorTheme.projects.path; + } + if (!settings.readOnly) { return fs.ensureDir(projectsDir) //TODO: this is accessing settings from storage directly as settings @@ -501,6 +506,11 @@ async function getFlows() { if (!initialFlowLoadComplete) { initialFlowLoadComplete = true; log.info(log._("storage.localfilesystem.user-dir",{path:settings.userDir})); + + if (projectsEnabled) { + log.info(log._("storage.localfilesystem.projects.projects-directory", {projectsDirectory: projectsDir})); + } + if (activeProject) { // At this point activeProject will be a string, so go load it and // swap in an instance of Project diff --git a/packages/node_modules/@node-red/runtime/locales/en-US/runtime.json b/packages/node_modules/@node-red/runtime/locales/en-US/runtime.json index 58eb7308d..02e15aa88 100644 --- a/packages/node_modules/@node-red/runtime/locales/en-US/runtime.json +++ b/packages/node_modules/@node-red/runtime/locales/en-US/runtime.json @@ -156,6 +156,7 @@ "projects": { "changing-project": "Setting active project : __project__", "active-project": "Active project : __project__", + "projects-directory": "Projects directory: __projectsDirectory__", "project-not-found": "Project not found : __project__", "no-active-project": "No active project : using default flows file", "disabled": "Projects disabled : editorTheme.projects.enabled=false",