1
0
Fork 0
mirror of https://github.com/vbatts/go-mtree.git synced 2025-07-04 06:38:30 +00:00

compare: correctly use .Prefix() during comparisons

During the rework of how xattr fields are handled, the comparison code
was not correctly updated. As a result, changes to xattrs would not be
detected in any form. This was detected in the umoci integration suite.
In addition, fix the dh.UsedKeywords logic so auto-detection works
correctly with prefix-based xattrs.

Fixes: ed464af779 ("*: xattr can Update()")
Signed-off-by: Aleksa Sarai <asarai@suse.de>
This commit is contained in:
Aleksa Sarai 2017-09-29 20:33:41 +10:00
parent ba49f2f918
commit 8e5c54f51d
No known key found for this signature in database
GPG key ID: 9E18AA267DDB8DB4
3 changed files with 17 additions and 4 deletions

View file

@ -36,7 +36,7 @@ func (dh DirectoryHierarchy) UsedKeywords() []Keyword {
if e.Type != SpecialType || e.Name == "/set" {
kvs := e.Keywords
for _, kv := range kvs {
kw := KeyVal(kv).Keyword()
kw := KeyVal(kv).Keyword().Prefix()
if !InKeywordSlice(kw, usedkeywords) {
usedkeywords = append(usedkeywords, KeywordSynonym(string(kw)))
}