2

Closed

Can't delete .z01 file after extraction of multi-segment archive

description

Here is an example, the first using(FileStream f = new FileStream) runs fine but the second time it returns an exception that the file can't be accessed, the extraction itself was successful:
 
        using (FileStream f = new FileStream(@"c:\test\EDRM-multivolume.z01", FileMode.Open, FileAccess.Write)) {
        }

        int counter = 0; 
        using (ZipFile file = new ZipFile(@"c:\test\EDRM-multivolume.zip")) {
            List entries = file.Entries.ToList();
            foreach (ZipEntry entry in entries) {
                counter++;
                if (!entry.IsDirectory) {
                    entry.FileName = @"result" + counter.ToString() + ".txt";
                    entry.Extract(@"C:\testResults"); 
                }
            }
        }
 
        using (FileStream f = new FileStream(@"c:\test\EDRM-multivolume.z01", FileMode.Open, FileAccess.Write)) {
        }
 
My aim is to delete the archive after it has been extracted.
Closed Jun 15, 2011 at 8:03 PM by Cheeso
this is fixed in changeset 79174. The first binary to get this fix is v1.9.1.6.

comments