signal-desktop/patches/growing-file+0.1.3.patch
Fedor Indutny a9fb186c23
Use pnpm
2025-02-19 11:16:41 -07:00

25 lines
805 B
Diff

diff --git a/lib/growing_file.js b/lib/growing_file.js
index a25d618..0ff7634 100644
--- a/lib/growing_file.js
+++ b/lib/growing_file.js
@@ -69,11 +69,15 @@ 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
+ });
+ } catch (error) {
+ this._handleError(error);
+ }
this._stream.on('error', this._handleError.bind(this));
this._stream.on('data', this._handleData.bind(this));