Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pack or extract of package does not preserve timestamps on file attributes #5240

Open
BlairPaine opened this issue May 17, 2017 · 5 comments
Labels
Functionality:Pack help wanted Considered good issues for community contributions. Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time
Milestone

Comments

@BlairPaine
Copy link

When I pack or unpack (install) with nuget it does not preserve the timestamps on included files. For example the date created and date modified attributes. I can see files in my package have been stamped with the date and time of package creation.

Were the changes for the above issues fixed and merged correctly?

Appears to be related/replica of:
NuGet do not honor time-stamps when unpacking nupkg files #420
Set proper file timestamp when copying from unzipped folder #188

Details about Problem

NuGet.exe version = 4.1.0.2450 (also tried 3.3.0.212 and 3.4.4.1321)
.NET version = 4.6.01590
OS version = Windows Server 2012 R2 (6.3.9600)
Worked before? = Not for me.

Detailed repro steps so we can see the same problem

nuget.exe pack -Version -OutputDirectory
nuget.exe install -Source -OutputDirectory

@mirecg
Copy link

mirecg commented May 30, 2017

Hi, I'm having the same requirements like you and like most users out there.

I'm using nuget 3.5.0.1938 and my experience is little bit different.
For me install command respects the file timestamps and extracts files with the correct timestamp. This seems that was fixed in #420.
But the problem remains in pack command, which sets the timestamps to the current time for all packed files. So the fix of install command doesn't have desired effect.

@pepone
Copy link

pepone commented Jun 20, 2017

Hi,

Seems part of the problem is how the Zip entries are created in PackageBuilder.cs one possible fix is to set the LastWriteTime using the time from the file with the given path.

@BlairPaine
Copy link
Author

Thanks for the feedback. Can anyone tell me how I can get a NuGet developer to look into this and fix?

@rocker8942
Copy link

Hi,

I have the same issue. @mirecg seems pointed out exact spot. Can anyone help on this?

@mishra14 mishra14 added help wanted Considered good issues for community contributions. Functionality:Pack Product:NuGet.exe NuGet.exe labels Nov 9, 2017
@mishra14 mishra14 added this to the Backlog milestone Nov 9, 2017
@mishra14 mishra14 added the Priority:2 Issues for the current backlog. label Nov 9, 2017
@mishra14
Copy link
Contributor

mishra14 commented Nov 9, 2017

it seems that NuGet/NuGet.Client#188 did not fix this. Tagging @rohit21agrawal for visibility.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Functionality:Pack help wanted Considered good issues for community contributions. Priority:3 Issues under consideration. With enough upvotes, will be reconsidered to be added to the backlog. Product:NuGet.exe NuGet.exe Status:Excluded from icebox cleanup Status:Inactive Icebox issues not updated for a specific long time
Projects
None yet
Development

No branches or pull requests

8 participants