Merge pull request #1804 from node-red-hitachi/0.19-fix-cache-error

Fix the error that the parent directory of the context does not exist
This commit is contained in:
Nick O'Leary
2018-07-13 11:58:14 +01:00
committed by GitHub
2 changed files with 122 additions and 1 deletions

View File

@@ -145,7 +145,7 @@ LocalFileSystem.prototype.open = function(){
});
}).catch(function(err){
if(err.code == 'ENOENT') {
return fs.mkdir(self.storageBaseDir);
return fs.ensureDir(self.storageBaseDir);
}else{
return Promise.reject(err);
}