This project is read-only.

Odd errors when reading soming ZIP files

Dec 15, 2010 at 2:36 PM


I have been testing the latest DotNetZip in my C# VS 2008.  Initially, everything was running smoothly and I had no problems reading zip files.  To do so, I would have the following:

using (ZipFile zip = ZipFile.Read(filepath)) {
     foreach (ZipEntry entry in zip) {
                 entry.Extract(storepath, ExtractExistingFileAction.OverwriteSilently);

All the file (and directories) in the ZIP file would get created in my storepath area.  Now, for some reason, I am getting some error on the extraction when reading some ZIP files.  These include:

1) "Could not find file 'E\tmp\'".  In this case, my ZIP had several files, some at the the base (not in a sub-directory) and some in sub-directories.  The "" file is listed first and is not in a sub-directory.  The ZIP file was read from the E:\tmp directory.

2) "Could not find a part of the path 'E:\tmp\z_test\bb\bbb\dir2a\'".  In this case I have a zip file being read from the E:\tmp\z_test\bb directory.  Within the ZIP, there is a bbb\dir2a\dir2b sub-directory structure with a file located in each directory.

Does anyone have a clue as to why DotNetZip is having an issue reading these ZIP files?  The problem is, I can get the same error on other ZIP files, but seeemingly have no problem with some other ZIP files. 

Thanks - Peter



Dec 17, 2010 at 6:54 PM

First, in order to help diagnose the problem, I'll need a full stack trace of any exception you get out of DotNetZip.   The error messages you posted are interesting, but not useful unless I know exactly where they are originating.  I've often seen the case that error messages like these originate in user code, and I'm obviously not going to be able to help much with that.

Then, if it appears that it is happening within the DotNetZip library, I'll need to look at a zip file that causes the problem. If you had a small zip file that exhibits the problem, I could look into it to see if I can detect any problems in the zip.