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

Preserve file timestamp metadata #44

Open
kprasadvnsi opened this issue Nov 9, 2022 · 0 comments
Open

Preserve file timestamp metadata #44

kprasadvnsi opened this issue Nov 9, 2022 · 0 comments
Labels
kind/feature New feature request

Comments

@kprasadvnsi
Copy link

Feature request

Make the downloaded file timestamp metadata same as the original file.

Current Behavior

http://tw2.mirror.archlinuxarm.org/aarch64/core/acl-2.3.1-2-aarch64.pkg.tar.xz

$ stat acl-2.3.1-2-aarch64.pkg.tar.xz 
  File: acl-2.3.1-2-aarch64.pkg.tar.xz
  Size: 135268    	Blocks: 272        IO Block: 4096   regular file
Device: 801h/2049d	Inode: 14949402    Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/      kp)   Gid: ( 1000/      kp)
Access: 2022-11-09 22:41:20.371253621 +0530
Modify: 2022-11-09 22:41:21.139253431 +0530
Change: 2022-11-09 22:41:21.139253431 +0530
 Birth: 2022-11-09 22:41:20.371253621 +0530

Expected Behavior

$ stat acl-2.3.1-2-aarch64.pkg.tar.xz 
  File: acl-2.3.1-2-aarch64.pkg.tar.xz
  Size: 135268    	Blocks: 272        IO Block: 4096   regular file
Device: 801h/2049d	Inode: 15076422    Links: 1
Access: (0664/-rw-rw-r--)  Uid: ( 1000/      kp)   Gid: ( 1000/      kp)
Access: 2022-11-09 22:52:09.000000000 +0530
Modify: 2022-02-02 19:36:15.000000000 +0530
Change: 2022-11-09 22:52:09.642461476 +0530
 Birth: 2022-11-09 22:52:08.878462901 +0530

Possible Solution

The modified date is the most relevant one in this context. We could take the "last-modified" value from the response header and use it to set the modified property of the downloaded file.

@kprasadvnsi kprasadvnsi added the kind/feature New feature request label Nov 9, 2022
@kprasadvnsi kprasadvnsi changed the title Preserve timestamp metadata Preserve file timestamp metadata Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature New feature request
Projects
None yet
Development

No branches or pull requests

1 participant