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:
parent
ba49f2f918
commit
8e5c54f51d
3 changed files with 17 additions and 4 deletions
|
@ -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)))
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue