summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/tar/lib/parse.js
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/tar/lib/parse.js')
-rw-r--r--deps/npm/node_modules/tar/lib/parse.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/deps/npm/node_modules/tar/lib/parse.js b/deps/npm/node_modules/tar/lib/parse.js
index 884e73dbac..009a85f413 100644
--- a/deps/npm/node_modules/tar/lib/parse.js
+++ b/deps/npm/node_modules/tar/lib/parse.js
@@ -37,6 +37,7 @@ function Parse () {
me.readable = true
me._stream = new BlockStream(512)
me.position = 0
+ me._ended = false
me._stream.on("error", function (e) {
me.emit("error", e)
@@ -118,13 +119,13 @@ Parse.prototype._process = function (c) {
// so appending one tarball to another is technically valid.
// ending without the eof null blocks is not allowed, however.
if (zero) {
- this._ended = this._eofStarted
+ if (this._eofStarted)
+ this._ended = true
this._eofStarted = true
} else {
- this._ended = this._eofStarted = false
+ this._eofStarted = false
this._startEntry(c)
}
-
}
this.position += 512