Commit 9fc84b9 1 parent 15e59f1 commit 9fc84b9 Copy full SHA for 9fc84b9
File tree 1 file changed +4
-8
lines changed
1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -38,7 +38,7 @@ function Parse () {
38
38
me . _stream = new BlockStream ( 512 )
39
39
me . position = 0
40
40
me . _ended = false
41
- me . _hardLinks = [ ]
41
+ me . _hardLinks = { }
42
42
43
43
me . _stream . on ( "error" , function ( e ) {
44
44
me . emit ( "error" , e )
@@ -251,18 +251,14 @@ Parse.prototype._startEntry = function (c) {
251
251
252
252
if ( onend ) entry . on ( "end" , onend )
253
253
254
- if ( entry . type === "File" ) {
255
- this . _hardLinks . forEach ( function ( link ) {
256
- if ( link . path === entry . path ) {
257
- ev = "ignoredEntry"
258
- }
259
- } )
254
+ if ( entry . type === "File" && this . _hardLinks [ entry . path ] ) {
255
+ ev = "ignoredEntry"
260
256
}
261
257
262
258
this . _entry = entry
263
259
264
260
if ( entry . type === "Link" ) {
265
- this . _hardLinks . push ( entry )
261
+ this . _hardLinks [ entry . path ] = entry
266
262
}
267
263
268
264
var me = this
You can’t perform that action at this time.
0 commit comments