{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "",
    "ClosedDate": null,
    "CommentCount": 0,
    "Custom": null,
    "Description": "Hi, \n\nI want to rename the files and place them in specific directories when I add them to the zip file.\n\nzip.AddDirectoryByName(\"test\");\nzip.AddFile(\"FilePath\", \"test\").FileName =\"New File name\";\n\nWhat the above code does, it creates a folder 'test' and rename the file. But the file is saved to the root directory rather than in the 'test' directory.\n\nPlease can someone help.\n\nThanks in advance.",
    "LastUpdatedDate": "2015-02-26T17:11:23.58-08:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2013-01-16T21:36:50.48-08:00",
    "Status": {
      "Name": "Proposed",
      "Id": 1
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "File rename and adding new directories not working.",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 2,
    "Id": 15964
  },
  "FileAttachments": [],
  "Comments": [
    {
      "Message": "Please can someone help me with the above query. Any help is greatly appreciated. ",
      "PostedDate": "2013-01-21T17:34:57.903-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:42:42.067-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-09-02T11:26:57.423-07:00",
      "Id": -2147483648
    },
    {
      "Message": "                ZipEntry zipEntry = zipFile.AddFile(data.FullPath, newPath);\n                zipEntry.FileName = Path.Combine(Path.GetDirectoryName(zipEntry.FileName) ?? \"\", data.Name);\r\n\r\ndata.fullPath is the filesystem path\nnewPath is the archive directory to put it in\ndata.Name is the new name of the file",
      "PostedDate": "2015-02-26T17:11:23.58-08:00",
      "Id": -2147483648
    }
  ]
}