{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "Fixed in change set 21345.  I added a test case to cover this, too. This fix will be in the v1.6 release.  It is in the v1.6 preview, now.",
    "ClosedDate": "2008-07-19T06:54:27.59-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "Hi,\n(Vista Ultimate x64, VS2008, DotNetZip_21104)\nThere seems to be a bug in the ZipFile.Save functionality.  The ZipEntry does no get written correctly until the ZipFile object is destroyed.  This can be shown with the following example where by the input stream is null in the _ExtractOne method when the code fails.\n \n            //This code works\n            using (ZipFile zf = new ZipFile(@\"C:\\Users\\Frazer\\Test.zip\")) {\n                MemoryStream ms = new MemoryStream(Encoding.UTF8.GetBytes(\"<bob />\"));\n                zf.AddFileStream(\"Test.xml\", \"Woo\", ms);\n                zf.Save();\n            }\n            using (ZipFile zf = new ZipFile(@\"C:\\Users\\Frazer\\Test.zip\")) {\n                MemoryStream ms = new MemoryStream();\n                zf.Extract(\"Woo/Test.xml\", ms);\n                ms.Seek(0, SeekOrigin.Begin);\n                MessageBox.Show(XElement.Load(new XmlTextReader(ms)).ToString());\n            }\n \n            //This code fails\n            ZipFile zf2 = new ZipFile(@\"C:\\Users\\Frazer\\Test2.zip\");\n            MemoryStream ms2 = new MemoryStream(Encoding.UTF8.GetBytes(\"<bob />\"));\n            zf2.AddFileStream(\"Test.xml\", \"Woo\", ms2);\n            zf2.Save();\n \n            MemoryStream ms3 = new MemoryStream();\n            zf2.Extract(\"Woo/Test.xml\", ms3);\n            ms3.Seek(0, SeekOrigin.Begin);\n            MessageBox.Show(new XmlTextReader(ms3).Value);\n \n \nMy guess is that one of the variables that is populated during instansiation of the ZipFile is not being written during the Save.\n \nKeep up the good work, this is a great little utility\n \nThanks\n \nFrazer",
    "LastUpdatedDate": "2013-05-16T05:32:42.03-07:00",
    "PlannedForRelease": "1.6 DotNetZip Library",
    "ReleaseVisibleToPublic": true,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2008-07-17T05:15:48.437-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "ZipFile Extract Stream Error (Object reference not set to an instance of an object)",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 5593
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "Got it. I reproduced the problem. \r\nThis is a bug. It's not true that the ZipEntry does not get written properly.  The ZipEntry is written properly.   But in the scenario you have, the ZipEntry is not READ properly.  So what I'll do to fix it is, read in the ZipArchive properly on the first reference to an entry, after a save.  \r\n\r\n",
      "PostedDate": "2008-07-19T06:07:01.483-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2008-07-19T06:53:45.263-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2008-07-19T06:54:27.59-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:44:44.773-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:42.03-07:00",
      "Id": -2147483648
    }
  ]
}