{
  "WorkItem": {
    "AffectedComponent": {
      "Name": "",
      "DisplayName": ""
    },
    "ClosedComment": "",
    "ClosedDate": null,
    "CommentCount": 0,
    "Custom": null,
    "Description": "Hello,\n \nI Have Some Hidden Directories And Files In A Zip File, When I Extract Them With This Code:\n \n \nusing (ZipFile zip1 = ZipFile.Read(zip))\n{\n    foreach (ZipEntry unzip in zip1)\n    {\n        unzip.Extract(directory.Text, ExtractExistingFileAction.OverwriteSilently);\n    }\n}\n \n \nBut The Extracted Files And Directories Are Not Hidden.\n \nWhen I Extract The Zip With WinRAR Files And Directories Are Extracted Hidden Correctly.",
    "LastUpdatedDate": "2013-02-21T18:42:57.587-08:00",
    "PlannedForRelease": "",
    "ReleaseVisibleToPublic": false,
    "Priority": {
      "Name": "Low",
      "Severity": 50,
      "Id": 1
    },
    "ProjectName": "DotNetZip",
    "ReportedDate": "2012-01-10T14:56:30.55-08:00",
    "Status": {
      "Name": "Proposed",
      "Id": 1
    },
    "ReasonClosed": {
      "Name": "Unassigned"
    },
    "Summary": "Extract Hidden Files results in non-hidden files",
    "Type": {
      "Name": "Issue",
      "Id": 3
    },
    "VoteCount": 4,
    "Id": 14629
  },
  "FileAttachments": [
    {
      "FileId": 4224,
      "FileName": "ZipFile.Extract.cs",
      "DownloadUrl": ".\\4224"
    }
  ],
  "Comments": [
    {
      "Message": "I've attached a ZipEntry.Extract.cs file that fixes this problem. The issue stems from the InternalExtract function determining that it's working on a directory and exiting early before setting the stored attributes to that file/directory.\r\n\r\nI've simply modified the ValidateOutput if clause in the function:\r\nprivate void InternalExtract(string baseDir, Stream outstream, string password)\r\n\r\nto be:\r\n\r\nif (ValidateOutput(baseDir, outstream, out targetFileName))\r\n                {\r\n                    WriteStatus(\"extract dir {0}...\", targetFileName);\r\n                    // if true, then the entry was a directory and has been created.\r\n\r\n                    // Apply the stored attributes for this directory.\r\n#if NETCF\r\n                    // workitem 7926 - version made by OS can be zero or 10\r\n                    if ((_VersionMadeBy & 0xFF00) == 0x0a00 || (_VersionMadeBy & 0xFF00) == 0x0000)\r\n                        NetCfFile.SetAttributes(targetFileName, (uint)_ExternalFileAttrs);\r\n\r\n#else\r\n                    // workitem 7071\r\n                    //\r\n                    // We can only apply attributes if they are relevant to the NTFS\r\n                    // OS.  Must do this LAST because it may involve a ReadOnly bit,\r\n                    // which would prevent us from setting the time, etc.\r\n                    //\r\n                    // workitem 7926 - version made by OS can be zero (FAT) or 10\r\n                    // (NTFS)\r\n                    if ((_VersionMadeBy & 0xFF00) == 0x0a00 || (_VersionMadeBy & 0xFF00) == 0x0000)\r\n                        File.SetAttributes(targetFileName, (FileAttributes)_ExternalFileAttrs);\r\n#endif\r\n                    \r\n                    // We need to fire the Extract Event.\r\n                    OnAfterExtract(baseDir);\r\n                    return;\r\n                }",
      "PostedDate": "2012-01-24T18:59:43.673-08:00",
      "Id": -2147483648
    },
    {
      "Message": "",
      "PostedDate": "2013-02-21T18:42:57.587-08:00",
      "Id": -2147483648
    }
  ]
}