{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "I think either the zip file is incorrectly formatted&#59; Or, it is correctly formatted, and the expectations about how that zip file should behave are incorrect.   The zip spec says nothing about how to extract files with filenames that include leading slashes.  Most zip tools and libraries insert files with names that do not have leading slashes.  If a leading slash is present, it seems like the least incorrect or least surprising thing to do is to extract it to the filesystem root.The workaround is to remove the leading slash &#40;or backslash&#41; before extracting, or to create the zip file without that leading slash in the first place.",
    "ClosedDate": "2010-11-06T10:14:06.623-07:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "Hello,\n \nI try to unzip files that have been stored with path segments separated by backslashes, and including a leading backslash.  In this case, it seems that the base directory parameters used in the ZipEntry.Extract(BaseDirectory) is not working as i supposed it should. \n \nI have a Zip Test1.zip that Have two files inside it\n \n\\test\\file1.jpg\n\\test\\file2.jpg\n \nAnd I want to extract these files to the D:\\testing-directory\n \nSo I wrote the following code\n \nusing (ZipFile zip = ZipFile.Read(@\"D:\\test.zip\"))\n{\n\tforeach (ZipEntry item in zip)\n\t{\n\t\titem.Extract(@\"D:\\testing-directory\");\n\t}\n}\nbut my files are always written in the d:\\test folder\n \nI also try the zip.ExtractAll((@\"D:\\testing-directory\"); with the same issue\n \nDo you know why ?\n \nThanks",
    "LastUpdatedDate": "2013-05-16T05:31:53.077-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2010-02-26T03:17:03.893-08:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "When zip entries contain a leading backslash, unzip always inserts them at root",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 10329
  },
  "FileAttachments": [
    {
      "FileId": 2735,
      "FileName": "DOC_100204_US_IT.zip",
      "DownloadUrl": ".\\2735"
    }
  ],
  "Comments": [
    {
      "Message": "Please find attached the zip did with SharpZiplib library. When I parse the zip entries have filename starts with \"\\\\\" like this: \"\\\\DOC_100204_US_IT\\\\US_IT_Batch x update x.log\". this perhaps why they are not working with the Ionic.Zip libraries\r\nbecause in you ValidateOutput(string basedir, Stream outstream, out string OutputFile) method you catch \"/\" but not \"\\\".\r\nI did some testing (unzip Zip created with the Ionic.Zip library) and it works.\r\n\r\nWhy FileName ZipEntry properties are with \"/\"  instead of \"\\\"  in Zip created with Ionic.Zip librarie ?\r\nWe normally use \"/\" for URL and \\ for Network path.\r\nThanks for your help",
      "PostedDate": "2010-02-26T05:59:04.993-08:00",
      "Id": -2147483648
    },
    {
      "Message": "try again to attached my zip file",
      "PostedDate": "2010-02-26T06:02:39.97-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2010-02-26T06:02:46.89-08:00",
      "Id": -2147483648
    },
    {
      "Message": "When doing some testing I also noticed that when I modify FileName property using the below code it effectively modify it but don't know why it also create new entry at the end with the same FileName:\r\nAll Backslash are also replaced by Slash\r\n\r\nforeach (ZipEntry item in zip)\r\n{\r\n         if (item.FileName.StartsWith(\"\\\\\"))\r\n             item.FileName = item.FileName.Substring(1);\r\n }\r\nDo you have an Idea how I can handle this kind of Zip that contained leading Baskslash ?",
      "PostedDate": "2010-02-26T06:58:17.1-08:00",
      "Id": -2147483648
    },
    {
      "Message": "It works when using ZipInputStream but I need to detect first if zip comes from DotNetZipLib or SharpZipLib",
      "PostedDate": "2010-02-26T08:39:52.627-08:00",
      "Id": -2147483648
    },
    {
      "Message": "> Do you have an Idea how I can handle this kind of Zip that contained leading Baskslash ?\r\n\r\nThat Zip file is broken.  The zip format does not allow backslash (leading or otherwise) in the zip entry name.  Whatever you used to generate it is not producing a correct zip file.  \r\n\r\nI will try to modify DotNetZip to handle this error case.  I'll let you know how it goes. ",
      "PostedDate": "2010-02-26T10:43:36.253-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2010-02-26T10:52:12.753-08:00",
      "Id": -2147483648
    },
    {
      "Message": "Did you try the Attached zip file (Done with SharpZipLib) ? It's not broken as I can open it with WinZip. \r\n",
      "PostedDate": "2010-03-01T05:24:21.36-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2010-11-06T10:14:06.623-07:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:43:39.63-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-05-16T05:31:53.077-07:00",
      "Id": -2147483648
    }
  ]
}