{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "this is fixed in changeset 79174.  The first binary to get this fix is v1.9.1.6.  ",
    "ClosedDate": "2011-06-15T12:05:05.79-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "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.\n \nI'm getting an exception when deleting the spanned zip files after extracting, with the error text as follows:\n\"The process cannot access the file 'xxxx.z01' because it is being used by another process.\"\n \nI'm using Ionic.Zip.Reduced.dll v1.9.1.5, on WindowsXP\nThe code is broadly as follows:\n \n...\nZipFile^ zip;\ntry\n{\n    zip = ZipFile::Read(sourcePath);\n    zip->Password = password;\n    zip->ExtractAll(extractPath, ExtractExistingFileAction::OverwriteSilently);\n}\ncatch(...)\n{\n}\nfinally\n{\n    delete zip;\n}\n \ntry\n{\n    File::Delete(sourcePath);\n}\ncatch(Exception^ ex)\n{\n}\n...\n \n \nCouple of notes:\n1) I've used 'delete zip' rather than 'zip->~ZipFile()' as this has the same effect and is more idiomatic for C++.  (I tried zip->~ZipFile() just incase, but get the same results.)\n2) If the zip is a single span, it deletes just fine.\n2a) To test, I took out the 'delete zip', and I then get the exception even for single span archives, as you might expect!\n3) In Windows Explorer I can not delete any of the zip fragments until the extraction application exits.",
    "LastUpdatedDate": "2013-05-16T05:31:47.8-07:00",
    "PlannedForRelease": "v1.9.1.8 DotNetZip - Latest Stable",
    "ReleaseVisibleToPublic": true,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2010-06-01T08:04:58.847-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Multi-Span Zips not closing after ZipFile disposal",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 11003
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "I'm testing a fix for this.",
      "PostedDate": "2010-06-02T12:21:17.96-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Anything new about this issue? I have the exact same problem. It seems the Dispose() on the ZipFile object has a bug.\r\n\r\nTry\r\n            Dim strFile As String = \"C:\\zipped\\20100101.zip\"  '<--- zip file has been split using the MaxOutputSegmentSize property\r\n            Dim zip1 As Ionic.Zip.ZipFile = Ionic.Zip.ZipFile.Read(strFile)\r\n            Dim e As Ionic.Zip.ZipEntry\r\n            For Each e In zip1\r\n                e.Extract(\"C:\\unzipped\", Ionic.Zip.ExtractExistingFileAction.OverwriteSilently)\r\n            Next\r\n\r\n            zip1.Dispose()\r\n            zip1 = Nothing\r\n            Kill(strFile)  '<---- The process cannot access the file because it is being used by another process error...\r\n\r\n        Catch ex As Exception\r\n            Response.Write(ex.ToString)\r\n        End Try",
      "PostedDate": "2010-09-03T03:34:12.433-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Any movement of this ioexception error file is in use issue?  Having the same issue:\r\n\r\n         _sZipFile \"c:\\temp\\test.zip\"\r\n         main.sBaseDir = \"d:\\data\"\r\n         _iZipCnt = ZipFile.Read(_sZipFile).Count\r\n         Using zip1 As ZipFile = ZipFile.Read(_sZipFile)\r\n            Dim e As ZipEntry\r\n            _iCntr2 = 0\r\n            For Each e In zip1\r\n               _iCntr2 += 1\r\n               e.Extract(main.sBaseDir & \"\\temp\", ExtractExistingFileAction.OverwriteSilently)\r\n               main.tboxStatus.Text = \"Unpacking Invoice file \" & e.FileName & \" from \" & System.IO.Path.GetFileName(_sZipFile)\r\n               main.ProgBar1.Value = Int((_iCntr2 / _iZipCnt) * 100)\r\n               main.lblProgBar1.Text = main.ProgBar1.Value.ToString & \"%\"\r\n               Application.DoEvents()\r\n            Next\r\n         End Using\r\n\r\n         ' Move Zip File to Done\r\n         System.IO.Directory.CreateDirectory(main.sBaseDir & \"\\done\\\")\r\n         _sDoneFile = main.sBaseDir & \"\\done\\\" & Microsoft.VisualBasic.Format(Now, \"yyyyMMdd-hhmm-\") & System.IO.Path.GetFileName(_sZipFile)\r\n         System.IO.File.Copy(_sZipFile, _sDoneFile)\r\n         If System.IO.File.Exists(_sDoneFile) Then\r\n            System.IO.File.Delete(_sZipFile)           <=========   Herer is where I get the error\r\n         End If\r\n",
      "PostedDate": "2011-01-28T10:35:46.513-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-06-13T21:41:23.857-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2011-06-15T12:05:05.79-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:43:30.49-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:31:47.8-07:00",
      "Id": -2147483648
    }
  ]
}