Preserve timestamps of files transfered to/from cache
kskalski opened this issue · 0 comments
kskalski commented
I'm having trouble with using the extracted -> injected cache content in Rust environment. It appears as the compilation artifacts are ignored/invalidated by cargo
tool (I managed to successfully cache and re-use the downloaded dependencies, so the set-up itself seems to kind of work).
My current guess is that modifying timestamps during "dance" is making the files ignored.
In any case I think preserving timestamps would be a nice to have feature. It should be possible to achieve by
- augmenting
cp
with-p
flag (-p same as --preserve=mode,ownership,timestamps
): https://askubuntu.com/questions/1040885/copy-a-file-and-keep-the-same-timestamp-of-the-original-file - possibly also augmenting
tar
to increase precision of timestamps by-H posix
: https://unix.stackexchange.com/questions/397130/tar-how-to-preserve-timestamps-down-to-more-than-a-second-of-precision