From 72deee5d742553b52c060cd52571b9fd3c90645c Mon Sep 17 00:00:00 2001 From: Simon Hailes Date: Sun, 3 Nov 2019 08:24:47 +0000 Subject: [PATCH] Detect windows UNC '\\' as well as 'X:' as an absolute flow path - use the path.isAbsolute function instead of rolling our own. --- .../runtime/lib/storage/localfilesystem/projects/index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 674b380e6..82c1f8d39 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 @@ -56,8 +56,9 @@ function init(_settings, _runtime) { if (settings.flowFile) { flowsFile = settings.flowFile; - // handle Unix and Windows "C:\" - if ((flowsFile[0] == "/") || (flowsFile[1] == ":")) { + // handle Unix and Windows "C:\" and Windows "\\" for UNC. + if (fspath.isAbsolute(flowsFile)) { + //if (((flowsFile[0] == "\\") && (flowsFile[1] == "\\")) || (flowsFile[0] == "/") || (flowsFile[1] == ":")) { // Absolute path flowsFullPath = flowsFile; } else if (flowsFile.substring(0,2) === "./") {