`pax -rw -p m` sets mtimes with only seconds granularity

Originator:thakis
Number:rdar://FB8960643 Date Originated:2021 Jan 3
Status: Resolved:
Product: Product Version:
Classification: Reproducible:
 
% mkdir foo && touch foo/file
% (rm -rf bar && mkdir bar && cd foo && pax -rw -p m . ../bar)
% stat -f %Fm foo/file bar/file
1609694909.786078198
1609694972.000000000

bar/file should have an mtime that has subsecond resolution, like foo/file has.

This is important for mtime-based build systems. With the current behavior, builds that use pax to copy directories only work correctly if each build step takes at least a second. (Which is often the case --- but not always. When using `git bisect run` on a tiny project, this bug can cause problems.)

See https://github.com/nico/hack/blob/master/notes/copydir.md for some general background.

Comments

got fixed in macOS 12


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!