DinoChiesa / DotNetZip

Library for creating and reading .ZIP files from a .NET Language
Other
120 stars 41 forks source link

The process cannot access the file 'data.z01' because it is being used by another process. #12

Open 0x42h opened 3 years ago

0x42h commented 3 years ago

mainFile points to a multipart zip file spanned from data.zip to data.z04.

basePath contains the path to where the mainFile is.

  using (ZipFile zip = ZipFile.Read(mainFile))
  {
      zip.ExtractAll(tempDir, ExtractExistingFileAction.OverwriteSilently);
  }
  Directory.Delete(basePath, true); // System.IO.IOException: 'The process cannot access the file 'data.z01' because it is being used by another process.'

Why am I getting a warning that data.z01 is in use by another process? Even weider; why only that file, while all the other files go through the exact same process? Am I missing something?