{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "fixed in change set 26048.  This fix is available in the v1.7 preview release, will be in the v1.7 final release when it becomes available.",
    "ClosedDate": "2008-11-15T19:40:50.833-08:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "If you have a large file and when you are extracting it there is not enough space on disk (say you are extracting a 1GB file to a USB drive with 500MB free), an exception is thrown (as expected) but in that exception you cannot delete the file currently being extracted.\n \nI tried calling dispose but that does not help. Whatever has that file open, still has the file open after calling dispose (which surprised me).\n \nAny way around this? \n \nHere is some sample code. Of course, with this code you should never encounter such a problem but someone else could write to the drive after you start ExtractAll and before ExtractAll completes.\n \nTry\n            Using zip As New Ionic.Utils.Zip.ZipFile(TextBox2.Text)\n                Dim lngTotal As Long = 0\n                For Each entry As Ionic.Utils.Zip.ZipEntry In zip\n                    lngTotal += entry.UncompressedSize\n                Next\n                Dim boolEnoughSpace As Boolean = True\n                Dim strDrive As String = System.IO.Path.GetPathRoot(TextBox3.Text)\n                If strDrive.Contains(\":\") Then\n                    Dim di As New System.IO.DriveInfo(strDrive)\n                    If di.AvailableFreeSpace > lngTotal Then\n                        boolEnoughSpace = True\n                    Else\n                        boolEnoughSpace = False\n                    End If\n                End If\n                Console.WriteLine(\"Total: \" & lngTotal.ToString(\"#,##0\"))\n \n                If boolEnoughSpace Then\n                    zip.ExtractAll(TextBox3.Text)\n                Else\n                    MessageBox.Show(\"Not enough space\")\n                End If\n            End Using\n \n        Catch ex As Exception\n            If ex.Message.Contains(\"There is not enough space on the disk.\") Then\n                System.IO.Directory.Delete(TextBox3.Text, True)\n            Else\n                MessageBox.Show(\"Error: \" & ex.Message)\n            End If\n        End Try",
    "LastUpdatedDate": "2013-05-16T05:32:35.94-07:00",
    "PlannedForRelease": "1.7 DotNetZip",
    "ReleaseVisibleToPublic": true,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2008-11-12T07:09:29.69-08:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "File in use after dispose?",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 6591
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "The problem is, the zip library itself does not close the stream when an IO exception occurs, such as when there is not enough space.  ",
      "PostedDate": "2008-11-15T15:55:54.35-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2008-11-15T15:59:27.27-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2008-11-15T19:40:50.833-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:44:37.223-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:35.94-07:00",
      "Id": -2147483648
    }
  ]
}