Signal-Desktop/patches/growing-file+0.1.3.patch

27 lines
898 B
Diff

diff --git a/lib/growing_file.js b/lib/growing_file.js
index a25d618c340fa1ceb5bd717af650e854267a463d..baa80798e3e544dbccb857b6acba53c39864c1e8 100644
--- a/lib/growing_file.js
+++ b/lib/growing_file.js
@@ -69,11 +69,16 @@ GrowingFile.prototype._readUntilEof = function() {
this._reading = true;
- this._stream = fs.createReadStream(this._path, {
- start: this._offset,
- // @todo: Remove if this gets merged: https://github.com/joyent/node/pull/881
- end: Infinity
- });
+ try {
+ this._stream = fs.createReadStream(this._path, {
+ start: this._offset,
+ // @todo: Remove if this gets merged: https://github.com/joyent/node/pull/881
+ end: Infinity
+ });
+ this.readable = true;
+ } catch (error) {
+ this._handleError(error);
+ }
this._stream.on('error', this._handleError.bind(this));
this._stream.on('data', this._handleData.bind(this));