Created
September 4, 2010 08:50
-
-
Save russellhaering/565032 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From a577a6fc0a83adba1b5ba5de28a1e656ef68a570 Mon Sep 17 00:00:00 2001 | |
From: Russell Haering <russellhaering@gmail.com> | |
Date: Sat, 4 Sep 2010 01:48:40 -0700 | |
Subject: [PATCH] Prevent ReadStream.resume from breaking if the file isn't yet open. | |
--- | |
lib/fs.js | 4 +++- | |
1 files changed, 3 insertions(+), 1 deletions(-) | |
diff --git a/lib/fs.js b/lib/fs.js | |
index 7c8b38c..06df80f 100644 | |
--- a/lib/fs.js | |
+++ b/lib/fs.js | |
@@ -793,7 +793,9 @@ ReadStream.prototype.resume = function() { | |
this.buffer = null; | |
} | |
- this._read(); | |
+ if (this.fd) { | |
+ this._read(); | |
+ } | |
}; | |
-- | |
1.7.2.1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment