File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/main/java/org/codehaus/plexus/archiver Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -521,7 +521,7 @@ else if ( o instanceof PlexusIoResourceCollection )
521521 }
522522 }
523523
524- if ( nextEntry != null && seenEntries .contains ( nextEntry . getName () ) )
524+ if ( nextEntry != null && seenEntries .contains ( normalizedForDuplicateCheck ( nextEntry ) ) )
525525 {
526526 final String path = nextEntry .getName ();
527527
@@ -569,7 +569,7 @@ public ArchiveEntry next()
569569 final ArchiveEntry next = nextEntry ;
570570 nextEntry = null ;
571571
572- seenEntries .add ( next . getName ( ) );
572+ seenEntries .add ( normalizedForDuplicateCheck ( next ) );
573573
574574 return next ;
575575 }
@@ -578,7 +578,13 @@ public void remove()
578578 {
579579 throw new UnsupportedOperationException ( "Does not support iterator" );
580580 }
581+
582+ private String normalizedForDuplicateCheck (ArchiveEntry entry ){
583+ return entry .getName ().replace ( '\\' , '/' );
584+ }
585+
581586 };
587+
582588 }
583589
584590 public Map <String , ArchiveEntry > getFiles ()
You can’t perform that action at this time.
0 commit comments