summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastiaan van Stijn <thaJeztah@users.noreply.github.com>2023-05-05 01:14:43 +0200
committerGitHub <noreply@github.com>2023-05-05 01:14:43 +0200
commit24fd7c5eb823f6198ded2c1a1a5884e9646337ca (patch)
tree440270e67faee8d18e41c6a7fff14114efe23774
parentc5197fe6c5cf18700af34f8258a2d6b4151abeb8 (diff)
parent94fcd2d2ef064aa1402fb2b8edc9b2b3f92c43cd (diff)
downloaddocker-24fd7c5eb823f6198ded2c1a1a5884e9646337ca.tar.gz
Merge pull request #45465 from corhere/backport-23.0/copy-xattr-notsupp
[23.0 backport] d/graphdriver/copy: support src fs w/o xattr support
-rw-r--r--daemon/graphdriver/copy/copy.go6
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 {