-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Closed
Labels
Description
Describe the bug
In zstd 1.4.9 and earlier, the modification time of a compressed file was the same as the uncompressed file, but in 1.5.0 this is no longer the case and the modification time is set to the compression time.
To Reproduce
Steps to reproduce the behavior:
- Create a file:
touch testfile - Compress it:
zstd testfile - Compare the modification times:
stat testfile{,.zst}
Using zstd 1.5.0, testfile and testfile.zst have different modification times.
Expected behavior
The modification times would be the same, like in zstd 1.4.9. gzip, bzip2 and xz also have this behavior.
Desktop (please complete the following information):
- OS: Arch Linux
- Version: zstd 1.5.0
- Compiler: gcc 11.1.0
- Flags:
CFLAGS="-march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection",CXXFLAGS="$CFLAGS -Wp,-D_GLIBCXX_ASSERTIONS",LDFLAGS="-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" - Build system: Makefile
Additional context
git bisect shows that b87f97b is the first commit with this issue. The associated pull request (#2525) only mentions file permissions and not modification times.
Reactions are currently unavailable