mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Detect windows UNC '\\' as well as 'X:' as an absolute flow path - use the path.isAbsolute function instead of rolling our own.
This commit is contained in:
parent
6f91786f4d
commit
72deee5d74
@ -56,8 +56,9 @@ function init(_settings, _runtime) {
|
|||||||
|
|
||||||
if (settings.flowFile) {
|
if (settings.flowFile) {
|
||||||
flowsFile = settings.flowFile;
|
flowsFile = settings.flowFile;
|
||||||
// handle Unix and Windows "C:\"
|
// handle Unix and Windows "C:\" and Windows "\\" for UNC.
|
||||||
if ((flowsFile[0] == "/") || (flowsFile[1] == ":")) {
|
if (fspath.isAbsolute(flowsFile)) {
|
||||||
|
//if (((flowsFile[0] == "\\") && (flowsFile[1] == "\\")) || (flowsFile[0] == "/") || (flowsFile[1] == ":")) {
|
||||||
// Absolute path
|
// Absolute path
|
||||||
flowsFullPath = flowsFile;
|
flowsFullPath = flowsFile;
|
||||||
} else if (flowsFile.substring(0,2) === "./") {
|
} else if (flowsFile.substring(0,2) === "./") {
|
||||||
|
Loading…
Reference in New Issue
Block a user