mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Handle windows paths for context storage
This commit is contained in:
parent
ef8b936069
commit
d132d63c1d
@ -150,7 +150,7 @@ LocalFileSystem.prototype.open = function(){
|
|||||||
var promises = [];
|
var promises = [];
|
||||||
return listFiles(self.storageBaseDir).then(function(files) {
|
return listFiles(self.storageBaseDir).then(function(files) {
|
||||||
files.forEach(function(file) {
|
files.forEach(function(file) {
|
||||||
var parts = file.split("/");
|
var parts = file.split(path.sep);
|
||||||
if (parts[0] === 'global') {
|
if (parts[0] === 'global') {
|
||||||
scopes.push("global");
|
scopes.push("global");
|
||||||
} else if (parts[1] === 'flow.json') {
|
} else if (parts[1] === 'flow.json') {
|
||||||
@ -338,7 +338,7 @@ LocalFileSystem.prototype.clean = function(_activeNodes) {
|
|||||||
return cachePromise.then(() => listFiles(self.storageBaseDir)).then(function(files) {
|
return cachePromise.then(() => listFiles(self.storageBaseDir)).then(function(files) {
|
||||||
var promises = [];
|
var promises = [];
|
||||||
files.forEach(function(file) {
|
files.forEach(function(file) {
|
||||||
var parts = file.split("/");
|
var parts = file.split(path.sep);
|
||||||
var removePromise;
|
var removePromise;
|
||||||
if (parts[0] === 'global') {
|
if (parts[0] === 'global') {
|
||||||
// never clean global
|
// never clean global
|
||||||
|
Loading…
Reference in New Issue
Block a user