mirror of
https://github.com/moby/moby.git
synced 2026-01-11 18:51:37 +00:00
pkg/archive: don't call system.Lgetxattr on unsupported platforms
[pkg/system.Lgetxattr] is only implemented on Linux, and always produces
an ErrNotSupportedPlatform on other platforms.
This patch removes the call to this function, but intentionally leaves
it commented-out as a reminder to include this code if this would ever
be refactored and implemented on other platforms.
[pkg/system.Lgetxattr]: d1273b2b4a/pkg/system/xattrs_unsupported.go (L1-L8)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -84,7 +84,11 @@ func collectFileInfo(sourceDir string) (*FileInfo, error) {
|
||||
stat: s,
|
||||
}
|
||||
|
||||
info.capability, _ = system.Lgetxattr(path, "security.capability")
|
||||
// system.Lgetxattr is only implemented on Linux and produces an error
|
||||
// on other platforms. This code is intentionally left commented-out
|
||||
// as a reminder to include this code if this would ever be implemented
|
||||
// on other platforms.
|
||||
// info.capability, _ = system.Lgetxattr(path, "security.capability")
|
||||
|
||||
parent.children[info.name] = info
|
||||
|
||||
|
||||
Reference in New Issue
Block a user