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:
Sebastiaan van Stijn
2024-06-16 14:14:14 +02:00
parent c565a3a1fe
commit 94caeeb401

View File

@@ -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