[
  {
    "Id": "449903",
    "ThreadId": "214546",
    "Html": "Hi Cheeso,\r\n<br>Reposting from the 'C++/CLI and &quot;using&quot; keyword' thread, as requested!\r\n<br>\r\n<br>I'm using DotNetZip in a C++/CLI project to create encrypted and potentially multi-spanned archives, which are written to CD (hence the multi-spanning).  I also have a small app that auto-launches from the first CD, collates the fragments to a directory on the recipient machine's hard-drive, requests the password and decrypts the archive, attempting to clear up the zip fragments after the extraction is complete.\r\n<br>\r\n<br>I'm getting an exception when deleting the spanned zip files after extracting, with the error text as follows:\r\n<br>&quot;The process cannot access the file 'xxxx.z01' because it is being used by another process.&quot;\r\n<br>\r\n<br>I'm using Ionic.Zip.Reduced.dll v1.9.1.5, on WindowsXP\r\n<br>The code is broadly as follows:\r\n<br>\r\n<pre>...\r\nZipFile^ zip;\r\ntry\r\n{\r\n    zip = ZipFile::Read(sourcePath);\r\n    zip-&gt;Password = password;\r\n    zip-&gt;ExtractAll(extractPath, ExtractExistingFileAction::OverwriteSilently);\r\n}\r\ncatch(...)\r\n{\r\n}\r\nfinally\r\n{\r\n    delete zip;\r\n}\r\n\r\ntry\r\n{\r\n    Directory::Delete(sourcePath);\r\n}\r\ncatch(Exception^ ex)\r\n{\r\n}\r\n...\r\n</pre>\r\n<br>\r\n<br>Couple of notes:\r\n<br>1) I've used 'delete zip' rather than 'zip-&gt;~ZipFile()' as this has the same effect and is more idiomatic for C++.  (I tried zip-&gt;~ZipFile() just incase, but get the same results.)\r\n<br>2) If the zip is a single span, it deletes just fine.\r\n<br>2a) To test, I took out the 'delete zip', and I then get the exception even for single span archives, as you might expect!\r\n<br>3) In Windows Explorer I can not delete any of the zip fragments until the extraction application exits.\r\n<br>\r\n<br>So, I was wondering if the Dispose method fails to close the zip fragments when dealing with a multi-span archive?\r\n",
    "PostedDate": "2010-06-01T01:49:18.48-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "450022",
    "ThreadId": "214546",
    "Html": "<p>Hmmm, interesting.&nbsp; The diagnosis you suggest is possible - I'll&nbsp;investigate.&nbsp;&nbsp;</p>\r\n<p>It would be surprising because there are test cases tht cover multi-segment archives, and I believe those tests delete the zip file after use.</p>\r\n<p>It won't be hard for me to test it, though.&nbsp; I'll get back to you.</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2010-06-01T05:56:04.577-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "450091",
    "ThreadId": "214546",
    "Html": "<p>I've reproduced the behavior.&nbsp; Will let you know. . .</p>",
    "PostedDate": "2010-06-01T08:04:17.31-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "450092",
    "ThreadId": "214546",
    "Html": "This discussion has been copied to a work item. Click <a href=\"http://dotnetzip.codeplex.com/WorkItem/View.aspx?WorkItemId=11003\">here</a> to go to the work item and continue the discussion.",
    "PostedDate": "2010-06-01T08:04:59.857-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "450772",
    "ThreadId": "214546",
    "Html": "I'm testing a fix for the problem now. . .\r\n",
    "PostedDate": "2010-06-02T12:08:41.043-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "451187",
    "ThreadId": "214546",
    "Html": "<p>Thanks for the update, your dedication to this project does you proud!</p>",
    "PostedDate": "2010-06-03T06:47:08.383-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "488761",
    "ThreadId": "214546",
    "Html": "<p>Anything new about this? I'm struggling with this as well</p>",
    "PostedDate": "2010-09-03T03:51:32.253-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "490002",
    "ThreadId": "214546",
    "Html": "<p>bump...</p>",
    "PostedDate": "2010-09-07T03:42:49.94-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "653667",
    "ThreadId": "214546",
    "Html": "<p>This was a problem in the v1.9.1.5 release.&nbsp; It's fixed in the v1.9.1.7 release.&nbsp; Try it.</p>",
    "PostedDate": "2011-08-06T07:03:47.813-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]