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:
authorisaacs <i@izs.me>2012-10-12 02:53:11 +0400
committerisaacs <i@izs.me>2012-10-12 03:46:18 +0400
commit061f2075cf81017cdb40de80533ba18746743c94 (patch)
tree35f6b2608572336927f93c1fb7c36298e22ebf0f /lib/fs.js
parentd7c45ea7d03de5c4a6c71b34780150fcd1e6314c (diff)
string_decoder: Add 'end' method, do base64 properly
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;