{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "fixed in changeset 55620.  First binary&#58; v1.9.1.4, or v1.9.5.2.  ",
    "ClosedDate": "2010-02-10T20:53:50.99-08:00",
    "CommentCount": 0,
    "Custom": null,
    "Description": "See http://dotnetzip.codeplex.com/Thread/View.aspx?ThreadId=83047\n \nSuppose a directory on disk at c:\\Test, containing a single file: \"~5.txt\" .  Using the code:\n \nZipFile z = new ZipFile();\nz.AddSelectedFiles(\"name != *.zip*\", \"C:\\\\Test\\\\\", \"\", true);\nz.Save(\"C:\\\\Data\\\\zipfile.zip\");\n \n...results is a zipfile containing Test\\~.5.txt.  Unexpectedly, the full path is present.  Now if I correctly type the directory such as:\n \nz.AddSelectedFiles(\"name != *.zip*\", \"C:\\\\Test\\\\\", \"\", true);\n \nIt works as expected. \n \nOn line 558 of ZipFile.Selector is the following:\n \nstring dirInArchive = Path.GetDirectoryName(f).Replace(directoryOnDisk, directoryPathInArchive);\n \nIt looks through each file and does a replace.  Path.GetDirectoryName however doesn't seem to return the correct path if the file contains a \"~' and the case does not match the directory path. \n \nTo fix: \n \nstring dirInArchive = Path.GetDirectoryName(f).ToLower().Replace(directoryOnDisk.ToLower(), directoryPathInArchive);\n \n(the .ToLower() for directoryOnDisk could be done before the loop.)",
    "LastUpdatedDate": "2013-05-16T05:31:54.51-07:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2010-02-03T13:09:54.303-08:00",
    "Status": {
      "Name": "Closed",
      "Id": 4
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "AddSelectedFiles doesn't handle cased directories when ~ is present in filename",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 1,
    "Id": 10153
  },
  "FileAttachments": [],
  "Comments": []
}