mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
parent
46a8d96997
commit
978f4ecc58
@ -209,6 +209,7 @@ LocalFileSystem.prototype.open = function(){
|
||||
}
|
||||
});
|
||||
} else {
|
||||
self._flushPendingWrites = function() { }
|
||||
return fs.ensureDir(self.storageBaseDir);
|
||||
}
|
||||
}
|
||||
@ -219,6 +220,12 @@ LocalFileSystem.prototype.close = function(){
|
||||
clearTimeout(this._pendingWriteTimeout);
|
||||
delete this._pendingWriteTimeout;
|
||||
this.flushInterval = 0;
|
||||
self.writePromise = self.writePromise.then(function(){
|
||||
return self._flushPendingWrites.call(self).catch(function(err) {
|
||||
log.error(log._("context.localfilesystem.error-write",{message:err.toString()}));
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
return this.writePromise;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user