mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix an error when initializing the cache (#1788)
* Fix a error when initializing the cache * Make context directory if it is not there in initialization
This commit is contained in:
parent
407e16e900
commit
1bf4addf63
@ -143,7 +143,13 @@ LocalFileSystem.prototype.open = function(){
|
|||||||
self.cache.set(scope,key,data[key]);
|
self.cache.set(scope,key,data[key]);
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
})
|
}).catch(function(err){
|
||||||
|
if(err.code == 'ENOENT') {
|
||||||
|
return fs.mkdir(self.storageBaseDir);
|
||||||
|
}else{
|
||||||
|
return Promise.reject(err);
|
||||||
|
}
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user