This project is read-only.

An item with the same key has already been added Error

Feb 26, 2010 at 6:28 PM

While unzipping files I have started to run accross this error numerous times "An item with the same key has already been added".  I can extract the file with outher tools, just not IONIC ZIP.  I can email the file if it helps.  The line of code that produces the error.

Dim Zip As New ZipFile

Zip = ZipFile.Read("c:\BadZIP ID")




Feb 26, 2010 at 7:28 PM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.
Feb 26, 2010 at 7:31 PM
Edited Feb 26, 2010 at 7:31 PM

Can you upload the zip file to the workitem referenced above?

The design of DotNetZip assumes there are no duplicate names in a zip file.   Your report is the first I've heard of zipfiles with duplicate names. I can make DotNetZip more tolerant of that problem, though it doesn't make the problem go away.  There's a duplicate entry in the zip file that you will not be able to read.

Once you upload the zip file, I'll have a look and I'll probably be able to eliminate the runtime error.  You'll still have a problem though - one of your entries will be obscured or hidden.