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 {
|
} else {
|
||||||
|
self._flushPendingWrites = function() { }
|
||||||
return fs.ensureDir(self.storageBaseDir);
|
return fs.ensureDir(self.storageBaseDir);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -219,6 +220,12 @@ LocalFileSystem.prototype.close = function(){
|
|||||||
clearTimeout(this._pendingWriteTimeout);
|
clearTimeout(this._pendingWriteTimeout);
|
||||||
delete this._pendingWriteTimeout;
|
delete this._pendingWriteTimeout;
|
||||||
this.flushInterval = 0;
|
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;
|
return this.writePromise;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user