mirror of
https://github.com/vbatts/go-mtree.git
synced 2024-11-27 02:25:40 +00:00
keywords: tar.Xattrs is deprecated by PAXRecords
Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
This commit is contained in:
parent
3bc8e48538
commit
7b5bbd4eaa
1 changed files with 3 additions and 2 deletions
|
@ -1,3 +1,4 @@
|
||||||
|
//go:build linux
|
||||||
// +build linux
|
// +build linux
|
||||||
|
|
||||||
package mtree
|
package mtree
|
||||||
|
@ -69,11 +70,11 @@ var (
|
||||||
}
|
}
|
||||||
xattrKeywordFunc = func(path string, info os.FileInfo, r io.Reader) ([]KeyVal, error) {
|
xattrKeywordFunc = func(path string, info os.FileInfo, r io.Reader) ([]KeyVal, error) {
|
||||||
if hdr, ok := info.Sys().(*tar.Header); ok {
|
if hdr, ok := info.Sys().(*tar.Header); ok {
|
||||||
if len(hdr.Xattrs) == 0 {
|
if len(hdr.PAXRecords) == 0 {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
}
|
}
|
||||||
klist := []KeyVal{}
|
klist := []KeyVal{}
|
||||||
for k, v := range hdr.Xattrs {
|
for k, v := range hdr.PAXRecords {
|
||||||
encKey, err := govis.Vis(k, DefaultVisFlags)
|
encKey, err := govis.Vis(k, DefaultVisFlags)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, nil
|
return nil, nil
|
||||||
|
|
Loading…
Reference in a new issue