Skip to content

Commit

Permalink
Merge pull request #506 from hallyn/2023-10-04/marlstat
Browse files Browse the repository at this point in the history
tarGenerator.AddFile: ignore llistxattr eopnotsupp
  • Loading branch information
tych0 authored Oct 19, 2023
2 parents 312b2db + 685e414 commit 7b9470b
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion oci/layer/tar_generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
"github.com/opencontainers/umoci/pkg/system"
"github.com/opencontainers/umoci/pkg/testutils"
"github.com/pkg/errors"
"golang.org/x/sys/unix"
)

// ignoreXattrs is a list of xattr names that should be ignored when
Expand Down Expand Up @@ -201,7 +202,10 @@ func (tg *tarGenerator) AddFile(name, path string) error {
// XXX: This should probably be moved to a function in tar_unix.go.
names, err := tg.fsEval.Llistxattr(path)
if err != nil {
return errors.Wrap(err, "get xattr list")
if errors.Cause(err) != unix.EOPNOTSUPP {
return errors.Wrap(err, "get xattr list")
}
names = []string{}
}
for _, name := range names {
// Some xattrs need to be skipped for sanity reasons, such as
Expand Down

0 comments on commit 7b9470b

Please sign in to comment.