archive: preserve pre-open original atime, fixes #6194
When creating an archive with --atime on platforms without O_NOATIME, opening a file for reading could update atime before we recorded it (thus we archived the updated atime, not the original one).
Capture pre-open path-based-stat atime and use it if it pre-dates the atime we got from the fd AND if it refers to same fs object (avoid race condition).
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 81.09%. Comparing base (15f5923) to head (ec0cb41).
:warning: Report is 1 commits behind head on master.
Additional details and impacted files
@@ Coverage Diff @@
## master #9180 +/- ##
=======================================
Coverage 81.08% 81.09%
=======================================
Files 78 78
Lines 13659 13663 +4
Branches 2043 2044 +1
=======================================
+ Hits 11076 11080 +4
Misses 1910 1910
Partials 673 673
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
difficult to test in master: windows is too broken, lots of fail in cygwin.