From ad35cae4829188740a10e5d6f3983867858ef6a6 Mon Sep 17 00:00:00 2001 From: Aleksa Sarai Date: Sat, 17 Dec 2016 20:14:17 +1100 Subject: [PATCH] compare: always diff "xattr" keys Because of how xattr works (it will not be set on all files, but it's possible for it to be added to a file without changing any other key) it's necessary that we _always_ compute a diff when we hit an inode that has xattr keys set. Signed-off-by: Aleksa Sarai --- compare.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compare.go b/compare.go index b2340b3..57fb444 100644 --- a/compare.go +++ b/compare.go @@ -192,7 +192,7 @@ func compareEntry(oldEntry, newEntry Entry) ([]KeyDelta, error) { for _, kv := range oldKeys { key := kv.Keyword() // only add this diff if the new keys has this keyword - if key != "tar_time" && key != "time" && HasKeyword(newKeys, key) == emptyKV { + if key != "tar_time" && key != "time" && key != "xattr" && HasKeyword(newKeys, key) == emptyKV { continue } @@ -211,7 +211,7 @@ func compareEntry(oldEntry, newEntry Entry) ([]KeyDelta, error) { for _, kv := range newKeys { key := kv.Keyword() // only add this diff if the old keys has this keyword - if key != "tar_time" && key != "time" && HasKeyword(oldKeys, key) == emptyKV { + if key != "tar_time" && key != "time" && key != "xattr" && HasKeyword(oldKeys, key) == emptyKV { continue }