[
  {
    "Id": "537877",
    "ThreadId": "238890",
    "Html": "\r\n<p>Hello,</p>\r\n<p>Thanks for this very helpful library.</p>\r\n<p>Just ran into an issue when extracting spanned archives created with DotNetZip. My code is written in PowerShell.</p>\r\n<p>Code to create the spanned archive:</p>\r\n<p>$zipfile = new-object Ionic.Zip.ZipFile<br>\r\n$zipfile.UseZip64WhenSaving = [Ionic.Zip.Zip64Option]::AsNecessary<br>\r\n$zipfile.AddDirectory($inputDir.fullname)<br>\r\n$zipfile.MaxOutputSegmentSize = $archiveSegmentSize # 40MB<br>\r\n$zipfile.Save($archiveFile.Fullname)</p>\r\n<p>&nbsp;</p>\r\n<p>Code to extract the spanned archive:</p>\r\n<p><br>\r\n$zip = [Ionic.Zip.ZipFile]::Read($Zipfile.Fullname)<br>\r\n$zip.ExtractExistingFile = [Ionic.Zip.ExtractExistingFileAction]::OverwriteSilently<br>\r\n$zip.ExtractAll($OutputDirectory.FullName)<br>\r\n$zip.Dispose()<br>\r\n<br>\r\n</p>\r\n<p>This will create a spanned archive with say about 5 segments. What I've noticed is that after the spanned archive is extracted, file handles to the archive segments are not closed for most of the segments after calling the Dispose() method. This means the\r\n segment files cannot be deleted because they are still in use.</p>\r\n<p>This also seems to be the case when extracting a spanned archive with the DotNetZip-WinFormsTool program.</p>\r\n<p>When I tried the same code to extract a non-spanned ZIP created with DotNetZip, the file handle was closed and I could delete the ZIP file after.</p>\r\n<p>&nbsp;</p>\r\n",
    "PostedDate": "2010-12-19T02:11:16.98-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "538054",
    "ThreadId": "238890",
    "Html": "\r\n<p>It looks like the file handles get cleaned up after a bit of time which suggests the garbage collector is doing it. So I've added this to my PowerShell code and it seems to resolve the issue for now:</p>\r\n<p>[GC]::Collect()</p>\r\n",
    "PostedDate": "2010-12-19T15:53:29.783-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "538771",
    "ThreadId": "238890",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/workitem/12727\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2010-12-21T07:13:38.143-08:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]