[
  {
    "Id": "684415",
    "ThreadId": "275948",
    "Html": "<p>All,<br /> I recently downloaded this library and in the process of evaluating for my project.<br /> I have trying to unzip a zip file using the following code</p>\n<p>&nbsp;</p>\n<div style=\"color: black; background-color: white;\">\n<pre><span style=\"color: green;\">// Remove the directory part of the filename just prior to unzipping</span>\n<span style=\"color: green;\">// extracting only .xyz files</span>\nzip.ToList().Where(s =&gt; !s.IsDirectory &amp;&amp; Path.GetExtension(s.FileName) == <span style=\"color: #a31515;\">\".xyz\"</span>).ToList().\n                        ForEach(entry =&gt;\n                            {\n                                entry.FileName = Path.GetFileName(entry.FileName);\n                                entry.CreationTime = dtUploadTime;\n                                entry.Comment = sUser;\n                                entry.Extract(sUnpackDirectory, ExtractExistingFileAction.OverwriteSilently);\n                            });\n</pre>\n</div>\n<p>&nbsp;</p>\n<p>When the zip file is created via 7-zip the aforementioned code works fine and the unzip is successful.&nbsp;</p>\n<p>However when the file is created via Winzip I get the following error \"Not a valid Win32 FileTime. \" Please advise.</p>\n<p>Stacktrace results are shown below</p>\n<p><span style=\"color: #ff0000;\">&nbsp; &nbsp;at System.DateTime.ToFileTimeUtc()&nbsp; &nbsp;at System.IO.File.SetLastAccessTimeUtc(String path, DateTime lastAccessTimeUtc)&nbsp; &nbsp;at Ionic.Zip.ZipEntry._SetTimes(String fileOrDirectory, Boolean isFile)&nbsp; &nbsp;at Ionic.Zip.ZipEntry.InternalExtract(String baseDir, Stream outstream, String password)&nbsp; &nbsp;at Ionic.Zip.ZipEntry.Extract(String baseDirectory, ExtractExistingFileAction extractExistingFile) &nbsp;&nbsp;</span></p>\n<p>Your timely help is appreciated.</p>\n<p>Regards,<br /> Kaushik</p>",
    "PostedDate": "2011-10-14T12:13:09.347-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "687845",
    "ThreadId": "275948",
    "Html": "<p>hmmm, why are you setting the creation time before extracting?</p>\r\n<p>To avoid the problem, How about if you... don't do that?</p>\r\n<p>I don't know what \"dtUploadTime\" is, but it seems that DotNetZip is choking on some transformation of it.</p>\r\n<p>If you can provide a test case that reliably reproduces the problem, I'll open a workitem and get it fixed!</p>\r\n<p>&nbsp;</p>",
    "PostedDate": "2011-10-22T07:48:27.687-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  },
  {
    "Id": "688480",
    "ThreadId": "275948",
    "Html": "<p>I was able to address it using \"SetEntryTimes\"method.</p>\r\n<p>\r\n<div style=\"color: black; background-color: white;\">\r\n<pre>dtUploadTime = DateTime.Now;\r\n</pre>\r\n</div>\r\n</p>\r\n<p>The scenario that required this change is</p>\r\n<p>- User uploads a zip file</p>\r\n<p>- System unzips the file with the Creation date</p>\r\n<p>- the user will be able to search for the files based on upload date. (aka creation date in this scenario)</p>\r\n<p>&nbsp;</p>\r\n<p>Regards,</p>\r\n<p>Kaushik</p>",
    "PostedDate": "2011-10-24T08:31:57.117-07:00",
    "UserRole": null,
    "MarkedAsAnswerDate": null
  }
]