From d132d63c1d47d506aa21f4bcc90d868a1976968b Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Wed, 15 Aug 2018 15:31:42 +0100 Subject: [PATCH] Handle windows paths for context storage --- red/runtime/nodes/context/localfilesystem.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/red/runtime/nodes/context/localfilesystem.js b/red/runtime/nodes/context/localfilesystem.js index c72373a64..ff9f11d8e 100644 --- a/red/runtime/nodes/context/localfilesystem.js +++ b/red/runtime/nodes/context/localfilesystem.js @@ -150,7 +150,7 @@ LocalFileSystem.prototype.open = function(){ var promises = []; return listFiles(self.storageBaseDir).then(function(files) { files.forEach(function(file) { - var parts = file.split("/"); + var parts = file.split(path.sep); if (parts[0] === 'global') { scopes.push("global"); } else if (parts[1] === 'flow.json') { @@ -338,7 +338,7 @@ LocalFileSystem.prototype.clean = function(_activeNodes) { return cachePromise.then(() => listFiles(self.storageBaseDir)).then(function(files) { var promises = []; files.forEach(function(file) { - var parts = file.split("/"); + var parts = file.split(path.sep); var removePromise; if (parts[0] === 'global') { // never clean global