{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "Fixed with improved exception and better doc.  This is in change set 24132.  Will be in v1.6.",
    "ClosedDate": "2008-09-10T11:03:40.577-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "Could you pleasae add possibility to pass empty file path in constructor and check if file empty in it?",
    "LastUpdatedDate": "2013-05-16T05:32:39.403-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2008-09-05T07:21:12.443-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Add possibility to pass empty file path in constructor",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 6048
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "For example such passes as created by Path.GetTempFileName()",
      "PostedDate": "2008-09-05T07:22:30.037-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Sorry, can you explain what it is you are looking for here? \r\nBy \"empty file path\", do you mean String.Empty ??   \r\nIn other words, you want the constructor to NOT choke on an empty file path? \r\nWhat should it do if you pass an empty file path? \r\nWhat would you expect?\r\nOr do you want the constructor to handle NULL ?\r\n\r\nHelp me make sense of this.  The constructor accepts a name for a zipfile.  Either the file exists or it does not, and the ZipFile instance behaves differently in each of those cases.  What should the constructor do if the name of the zipfile is String.Empty?   I don't see an intuitive use for that ...\r\n\r\nAlso - I don't understand your comment \"For example such passes as created by Path.GetTempFileName()\" .  I don't know what to make of that. \r\n",
      "PostedDate": "2008-09-05T10:58:23.72-07:00",
      "Id": -2147483648
    },
    {
      "Message": "I wrote not clear. 'Empty file path' means a zero-length file like produced by Path.GetTempFileName() e.g . path of an empty file ",
      "PostedDate": "2008-09-07T08:26:13.693-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Ok, thanks.\r\nSo that I am clear - I understand that you want the ZipFile constructor to accept a filepath which refers to an empty file on the disk.  And what should the ZipFile constructor do, in that case?  the path you pass refers to an empty file.   It is not a legal ZipFile, though the file itself does exist. \r\n\r\n??\r\n\r\nIf you want to save the file to a uniquely-named location, can you not simply use the no-argument constructor, and then pass in the result of Path.GetTempFileName() to the Save() method on the ZipFile instance? \r\n\r\nusing (var zip = new ZipFile())\r\n{\r\n  // add entries to the zipfile, here\r\n  zip.Save(Path.GetTempFileName());\r\n}\r\n\r\n??\r\n",
      "PostedDate": "2008-09-08T13:23:21.977-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Just to extend my prior comment - passing in an empty file to the zipfile constructor seems like an error or exceptional condition.  That seems wrong.  I think most people would want the app to fail if they passed in a zero-length file as a zipfile.  \r\n\r\nSo I would hesitate to add this behavior to the ZipFile class; it seems counter-intuitive.  If you can explain what it is that you want to do, WHY you want the ZipFile ctor to accept an empty file, maybe I can understand better. ",
      "PostedDate": "2008-09-08T13:27:57.507-07:00",
      "Id": -2147483648
    },
    {
      "Message": "my proposal for treating empty files as empty zip archives in constructor or renaming parameter was because for me it wasn't obvious when i was creating zipSolution tool that in constructor i have to pass existing zip archive. \r\n\r\nWhen i found that code i wrote does not work i was angry that i thought i spent time in vain and the library does not work at all. Than i found that i have to delete file before pass it to constructor to avoid unknown exceptions.\r\n\r\nusing (var zip = new ZipFile())\r\n{\r\n// add entries to the zipfile, here\r\nzip.Save(Path.GetTempFileName());\r\n}\r\nYes a couple days ago i found such trick. So my proposal is to clarify it for other programmers\r\n\r\nSo i think it will be comfortable for developers\r\n1) to not pass any files in constructor at all. To write function OpenArchive(string zipFile) or\r\n2) to rename parameter zipFileName to existingZipFile (so from the first look it will be obvious that Path.GetTemFileName() is not a point to pass here) and to throw exception that \"File {0} is not a valid Zip archive\" or\r\n3) treat them as empty archives\r\n",
      "PostedDate": "2008-09-09T22:21:12.493-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Ah, ok.  Tell you what, I will update the documentation on that constructor to be more clear on how to use it.  Also I will modify the code to throw a better exception. This is pretty close to your #2 option.  Thanks for following up with me.",
      "PostedDate": "2008-09-10T10:43:25.253-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2008-09-10T11:03:40.577-07:00",
      "Id": -2147483648
    },
    {
      "Message": "Thank's",
      "PostedDate": "2008-09-11T10:28:14.133-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:44:41.487-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:39.403-07:00",
      "Id": -2147483648
    }
  ]
}