Skip to content

Commit

Permalink
Ignore zip file times from the future. Need a special fix just for 3.…
Browse files Browse the repository at this point in the history
…4.4, cherry-pick from dev isn't good enough.
  • Loading branch information
spadapet committed May 19, 2016
1 parent a6fd2a5 commit a12ef7d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,9 @@ public override IEnumerable<string> CopyFiles(
if (copiedFile != null)
{
var attr = File.GetAttributes(copiedFile);
if (!attr.HasFlag(FileAttributes.Directory) && entry.LastWriteTime.DateTime != DateTime.MinValue)
if (!attr.HasFlag(FileAttributes.Directory) &&
entry.LastWriteTime.DateTime != DateTime.MinValue && // Ignore invalid times
entry.LastWriteTime.UtcDateTime <= DateTime.UtcNow) // Ignore future times
{
try
{
Expand Down

0 comments on commit a12ef7d

Please sign in to comment.