summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Frei <freisim93@gmail.com>2022-11-08 08:36:41 +0100
committerGitHub <noreply@github.com>2022-11-08 08:36:41 +0100
commitce2a68622c55c61b673db9d6aac31f779ad01959 (patch)
treec15bcd003919c977453a43a7e810f4550e9d32ca
parenta29605750d23646c5cc91bba3b3df9204fee1eba (diff)
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)
-rw-r--r--lib/protocol/bep_extensions.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/protocol/bep_extensions.go b/lib/protocol/bep_extensions.go
index 3d3eb437c3..2290f2cce9 100644
--- a/lib/protocol/bep_extensions.go
+++ b/lib/protocol/bep_extensions.go
@@ -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
}