lib/protocol: Ignore inode time when xattr&ownership is ignored (fixes #8654) (#8655)

lib/protocol: Ignore inode time when both xattr and ownership is ignored (fixes #8654)
This commit is contained in:
Simon Frei 2022-11-08 08:36:41 +01:00 committed by GitHub
parent a29605750d
commit ce2a68622c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -244,9 +244,9 @@ func (f FileInfo) isEquivalent(other FileInfo, comp FileInfoComparison) bool {
return false
}
// If we are recording inode change times and it changed, they are not
// equal.
if (f.InodeChangeNs != 0 && other.InodeChangeNs != 0) && f.InodeChangeNs != other.InodeChangeNs {
// If we care about either ownership or xattrs, are recording inode change
// times and it changed, they are not equal.
if !(comp.IgnoreOwnership && comp.IgnoreXattrs) && f.InodeChangeNs != 0 && other.InodeChangeNs != 0 && f.InodeChangeNs != other.InodeChangeNs {
return false
}