{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "Not reproducible.",
    "ClosedDate": "2008-06-09T20:35:59.797-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "If you attempt to zip a directory that has no files in it (even if that directory has a sub-directory with files in it), and you pass in \"\" (null string) as the DirectoryPathInArchive argument, you get the following error:\nSystem.IndexOutOfRangeException: Index was outside the bounds of the array.",
    "LastUpdatedDate": "2013-05-16T05:32:43.913-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2008-06-09T13:09:55.823-07:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Can't zip directory with no files in root directory",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 5253
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "What version of the library are you using?  \r\n",
      "PostedDate": "2008-06-09T17:27:19.93-07:00",
      "Id": -2147483648
    },
    {
      "Message": "I have test cases that cover this scenario, and they pass.  There was a problem like this a while back, which is what prompted me to include these test cases.  But that problem is fixed in the 1.4 release.  \r\n\r\nIf you have a test case that reproduces the behavior on the 1.4 library, I would like to see it. \r\n",
      "PostedDate": "2008-06-09T20:35:42.563-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2008-06-09T20:35:59.797-07:00",
      "Id": -2147483648
    },
    {
      "Message": "I was using version 1.3, but now I upgraded to version 1.4, and I still get the same behavior. All you need to do is the following, where myDirectoryPath is a directory with no files in it (even if it has sub-directories with files):\r\n\r\n                using (ZipFile zip = new ZipFile(myZipFileName))\r\n                {\r\n                    zip.AddDirectory(myDirectoryPath, \"\");\r\n                    zip.Save();\r\n                }\r\n\r\n\r\nIf you pass in something for the DirectoryPathInArchive argument, it works. But passing \"\" (as in the above example) gives the System.IndexOutOfRangeException. Obviously an easy workaround, but it would be nice if it worked the way I expected.",
      "PostedDate": "2008-06-11T14:03:01.32-07:00",
      "Id": -2147483648
    },
    {
      "Message": "I have just downloaded the 1.5 sourcecode (uploaded Jul 22) and can confirm this is still an issue.\r\nThe problem appears to be in shared.cs TrimVolumeAndSwapSlashes ",
      "PostedDate": "2008-08-20T08:21:11.963-07:00",
      "Id": -2147483648
    },
    {
      "Message": "regarding that last comment: TrimVolumeAndSwapSlashes  has nothing to do with zipping a folder with no files in the root directory.  \r\nTrimVolumeAndSwapSlashes() had a bug indexing into a string, which would fail with short filenames. \r\nBut this has nothing to do with whether the parent folder has files or directories or what not.  \r\n\r\n\r\n",
      "PostedDate": "2008-08-28T17:20:31.04-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:44:47.553-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:32:43.913-07:00",
      "Id": -2147483648
    }
  ]
}