This project is read-only.


Bug when compressing .rar or .zip file


I found a bug, when compressing(actually archiving) a .rar or .zip file into segments, particularly if the file is large enough to generate more than one segment, DotNetZip will throw a "FileNotFoundException", saying that the XXX.z01 doesn't exists. From the code, it seems the method WantReadAgain(file: ZipEntry.Writer.cs) returns true if compressed size is larger than original size, and that will direct to method "TruncateBackward" (file: ZipSegmentedStream.cs) which generates the exception.
the exception is thrown from the following code:
// get a new temp file, try 3 times:
        for (int i = 0; i < 3; i++)
                _currentTempName = SharedUtilities.InternalGetTempFileName();
                File.Move(CurrentName, _currentTempName);  // move the .z0x file back to a temp name
                if (i == 2) throw;
Closed Jun 18, 2011 at 4:38 AM by Cheeso
fixed in changeset 79356. First binary to contain this fix: v1.9.1.6


lxitixl wrote Sep 6, 2010 at 7:32 AM

This seems like the same bug as #10143 at (Splitting Large (~1gb+) files leads to an exception)

wrote Sep 6, 2010 at 8:17 AM

Cheeso wrote Jun 18, 2011 at 4:37 AM

Yes, this is a duplicate bug. It is fixed in v1.9.1.6, which will be available soon.

wrote Jun 18, 2011 at 4:38 AM

wrote Feb 22, 2013 at 2:43 AM

wrote May 16, 2013 at 1:31 PM