We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 15e59f1 commit 9fc84b9Copy full SHA for 9fc84b9
lib/parse.js
@@ -38,7 +38,7 @@ function Parse () {
38
me._stream = new BlockStream(512)
39
me.position = 0
40
me._ended = false
41
- me._hardLinks = []
+ me._hardLinks = {}
42
43
me._stream.on("error", function (e) {
44
me.emit("error", e)
@@ -251,18 +251,14 @@ Parse.prototype._startEntry = function (c) {
251
252
if (onend) entry.on("end", onend)
253
254
- if (entry.type === "File") {
255
- this._hardLinks.forEach(function(link) {
256
- if (link.path === entry.path) {
257
- ev = "ignoredEntry"
258
- }
259
- })
+ if (entry.type === "File" && this._hardLinks[entry.path]) {
+ ev = "ignoredEntry"
260
}
261
262
this._entry = entry
263
264
if (entry.type === "Link") {
265
- this._hardLinks.push(entry)
+ this._hardLinks[entry.path] = entry
266
267
268
var me = this
0 commit comments