Skip to content

Commit

Permalink
also match verifier when atime is not preserved
Browse files Browse the repository at this point in the history
  • Loading branch information
willscott committed Aug 26, 2024
1 parent f218b73 commit e7154b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions nfs_oncreate.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,11 @@ func timestampsMatch(f os.FileInfo, propose *SetFileAttributes, fs billy.Filesys
if s.ModTime().Equal(f.ModTime()) && file.GetInfo(s).Atime.Equal(file.GetInfo(s).Atime) {
match = true
}
// Support the degraded case where atime is not roundtripped. The fallback here is that
// the observed atime will be set equal to mtime.
if s.ModTime().Equal(f.ModTime()) && file.GetInfo(f).Atime.Equal(f.ModTime()) {
match = true
}
} else {
Log.Warnf("Unable to stat temp file for create timestamp check: %v", err)
}
Expand Down

0 comments on commit e7154b3

Please sign in to comment.