mirror of https://github.com/node-red/node-red.git
Fix an error when initializing the cache (#1788)
* Fix a error when initializing the cache * Make context directory if it is not there in initializationpull/1780/head
parent
407e16e900
commit
1bf4addf63
|
@ -143,7 +143,13 @@ LocalFileSystem.prototype.open = function(){
|
|||
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 {
|
||||
return Promise.resolve();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue