1

Closed

ZipFile fails to find entry by Name

description

There is a problem with some zip files (attached). ZipFile default indexer fails to find entry by name, ever if the name was returned by ZipFile itself (see the example below, it throws "Bang!").
 
class Program
{
    static void Main(string[] args)
    {
        ZipFile file = new ZipFile("zip3.zip");
 
        foreach (string name in file.EntryFileNames)
        {
            ZipEntry entry = file[name];
 
            if (entry == null)
            {
                // it returned an entry name and then it cannot find it? wth?
                throw new Exception("Bang!");
            }
        }
    }
}

file attachments

Closed Jun 13, 2011 at 6:01 PM by Cheeso
Duplicate of workitem 11056. This is fixed in v1.9.1.6.

comments