Skip to content

Commit

Permalink
lib/protocol: Ignore inode time when xattr&ownership is ignored (fixes
Browse files Browse the repository at this point in the history
…syncthing#8654) (syncthing#8655)

lib/protocol: Ignore inode time when both xattr and ownership is ignored (fixes syncthing#8654)
  • Loading branch information
imsodin committed Nov 8, 2022
1 parent a296057 commit ce2a686
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/protocol/bep_extensions.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit ce2a686

Please sign in to comment.