2

Closed

Errors with Duplicate Entries

description

From http://dotnetzip.codeplex.com/discussions/207076
 
I am using the latest version of the library - I just downloaded it today to see what I could cook up with it.

 
The error that I get when I attempt to use RemoveEntry with the relativePath variable is just "The entry you specified was not found in the zip archive." There was no inner exception or any other seemingly useful data. Let me know if theres anything else I can provide you with!
 

 
As a workaround, I was able to get this kludge to work:
 
...
zip.RemoveEntry(getZipEntry(zip, relativePath))
...
 
private ZipEntry getZipEntry(ZipFile theZip, string fileName)
{
foreach (ZipEntry e in theZip.SelectEntries("*.inibin"))
{
    if (e.FileName.Equals(fileName))
    {
        return e;
    }
}
return null;
}
 
 
However - after successfully removing the entry, I was still getting 2 files in the zip file. Maybe an Entry doesnt behave as I am expecting?
Closed Jun 21, 2011 at 7:47 PM by Cheeso
This is fixed in v1.9.1.6. I didn't actually produce a fix, but I produced a test and it passed. See changeset 79567.

comments