Handle windows paths for context storage

This commit is contained in:
Nick O'Leary 2018-08-15 15:31:42 +01:00
parent ef8b936069
commit d132d63c1d
No known key found for this signature in database
GPG Key ID: 4F2157149161A6C9
1 changed files with 2 additions and 2 deletions

View File

@ -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