Merge pull request #47483 from akerouanton/25.0-best-effort-xattrs-classic-builder

[25.0 backport] builder/dockerfile: ADD with best-effort xattrs
This commit is contained in:
Sebastiaan van Stijn 2024-03-01 11:03:34 +01:00 committed by GitHub
commit b77bb69f87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -459,7 +459,16 @@ func performCopyForInfo(dest copyInfo, source copyInfo, options copyFileOptions)
return copyDirectory(archiver, srcPath, destPath, options.identity)
}
if options.decompress && archive.IsArchivePath(srcPath) && !source.noDecompress {
return archiver.UntarPath(srcPath, destPath)
f, err := os.Open(srcPath)
if err != nil {
return err
}
defer f.Close()
options := &archive.TarOptions{
IDMap: archiver.IDMapping,
BestEffortXattrs: true,
}
return archiver.Untar(f, destPath, options)
}
destExistsAsDir, err := isExistingDirectory(destPath)