borg icon indicating copy to clipboard operation
borg copied to clipboard

archive: preserve pre-open original atime, fixes #6194

Open ThomasWaldmann opened this issue 1 month ago • 2 comments

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).

ThomasWaldmann avatar Nov 17 '25 22:11 ThomasWaldmann

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.

codecov[bot] avatar Nov 17 '25 22:11 codecov[bot]

difficult to test in master: windows is too broken, lots of fail in cygwin.

ThomasWaldmann avatar Nov 17 '25 23:11 ThomasWaldmann