aonez / Keka

The macOS & iOS file archiver
https://www.keka.io
4.72k stars 236 forks source link

Timestamps for single files (GZ, BZ2, XZ) #261

Open bb8 opened 6 years ago

bb8 commented 6 years ago

When using the single file mode (e.g. for GZIP), it'd be good to have an option to maintain the files' timestamps, much like the gzip cli utility.

aonez commented 6 years ago

@bb8 by default it maintains creation and modified times. Don't you mean those?

bb8 commented 6 years ago

Yes, the creation and modified times. Using the GZIP method in Keka, with the option to archive as single files, the resulting .gz file has the date and time when the archive was created, instead of the original file's timestamp. This is in 1.1.3.

aonez commented 6 years ago

Ok so you're talking about the actual .gz file, not it's content.

bb8 commented 6 years ago

Well both, because when extracting the .gz file with Finder and gunzip, the decompressed file appears to inherit the .gz file's creation and modification timestamps.

aonez commented 6 years ago

You're right. I'll investigate this one.

aonez commented 6 years ago

So files compressed individually (no tarball) are done using p7zip. Tarballs use bsdtar and pigz instead. Maybe using pigz directly will be a good idea.

aonez commented 6 years ago

The same applies to BZIP2 and XZ.