diff options
author | Brian Goff <cpuguy83@gmail.com> | 2023-05-04 12:00:50 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-04 12:00:50 -0700 |
commit | 698fa85f38a1ddec0101b25c1e2a50fd59863810 (patch) | |
tree | 6c343dce9c19af0b80ca7133d15ef24ebbb8b5ac | |
parent | 8a4b095a94d57288ab5be58d2abdb7b84309b508 (diff) | |
parent | 2b6761fd3e7ee00056e43de6e6092d5e3401c1fc (diff) | |
download | docker-698fa85f38a1ddec0101b25c1e2a50fd59863810.tar.gz |
Merge pull request #45463 from corhere/copy-xattr-notsupp
d/graphdriver/copy: support src fs w/o xattr support
-rw-r--r-- | daemon/graphdriver/copy/copy.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/daemon/graphdriver/copy/copy.go b/daemon/graphdriver/copy/copy.go index 0fb8a1a9d9..8136b7a172 100644 --- a/daemon/graphdriver/copy/copy.go +++ b/daemon/graphdriver/copy/copy.go @@ -5,6 +5,7 @@ package copy // import "github.com/docker/docker/daemon/graphdriver/copy" import ( "container/list" + "errors" "fmt" "io" "os" @@ -90,6 +91,11 @@ func legacyCopy(srcFile io.Reader, dstFile io.Writer) error { func copyXattr(srcPath, dstPath, attr string) error { data, err := system.Lgetxattr(srcPath, attr) if err != nil { + if errors.Is(err, syscall.EOPNOTSUPP) { + // Task failed successfully: there is no xattr to copy + // if the source filesystem doesn't support xattrs. + return nil + } return err } if data != nil { |