Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/fs.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/fs.js')
-rw-r--r--lib/fs.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/fs.js b/lib/fs.js
index e8a9aa4f727..8041ab620df 100644
--- a/lib/fs.js
+++ b/lib/fs.js
@@ -1402,6 +1402,11 @@ ReadStream.prototype._read = function() {
}
if (bytesRead === 0) {
+ if (this._decoder) {
+ var ret = this._decoder.end();
+ if (ret)
+ this.emit('data', ret);
+ }
self.emit('end');
self.destroy();
return;