diff --git a/lib/parse.js b/lib/parse.js index 600ad782..fdcdd7d4 100644 --- a/lib/parse.js +++ b/lib/parse.js @@ -38,6 +38,7 @@ function Parse () { me._stream = new BlockStream(512) me.position = 0 me._ended = false + me._entries = [] me._stream.on("error", function (e) { me.emit("error", e) @@ -250,7 +251,16 @@ Parse.prototype._startEntry = function (c) { if (onend) entry.on("end", onend) + if (entry.type === "File") { + this._entries.forEach(function(prevEntry) { + if (prevEntry.type === "Link" && prevEntry.path === entry.path) { + ev = "ignoredEntry" + } + }) + } + this._entry = entry + this._entries.push(entry) var me = this entry.on("pause", function () {