Skip to content

Commit 7b5bbd4

Browse files
committed
keywords: tar.Xattrs is deprecated by PAXRecords
Signed-off-by: Vincent Batts <[email protected]>
1 parent 3bc8e48 commit 7b5bbd4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

keywordfuncs_linux.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build linux
12
// +build linux
23

34
package mtree
@@ -69,11 +70,11 @@ var (
6970
}
7071
xattrKeywordFunc = func(path string, info os.FileInfo, r io.Reader) ([]KeyVal, error) {
7172
if hdr, ok := info.Sys().(*tar.Header); ok {
72-
if len(hdr.Xattrs) == 0 {
73+
if len(hdr.PAXRecords) == 0 {
7374
return nil, nil
7475
}
7576
klist := []KeyVal{}
76-
for k, v := range hdr.Xattrs {
77+
for k, v := range hdr.PAXRecords {
7778
encKey, err := govis.Vis(k, DefaultVisFlags)
7879
if err != nil {
7980
return nil, nil

0 commit comments

Comments
 (0)