From a12ef7d4dac7cdaeb7188a7143457b0263a3a9b8 Mon Sep 17 00:00:00 2001 From: Peter Spada Date: Thu, 19 May 2016 10:06:48 -0700 Subject: [PATCH] Ignore zip file times from the future. Need a special fix just for 3.4.4, cherry-pick from dev isn't good enough. --- src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs b/src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs index c748fa37c0d..8d406e83b55 100644 --- a/src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs +++ b/src/NuGet.Core/NuGet.Packaging/PackageArchiveReader.cs @@ -171,7 +171,9 @@ public override IEnumerable 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 {