Skip to content

Commit

Permalink
Merge pull request #47483 from akerouanton/25.0-best-effort-xattrs-cl…
Browse files Browse the repository at this point in the history
…assic-builder

[25.0 backport] builder/dockerfile: ADD with best-effort xattrs
  • Loading branch information
thaJeztah committed Mar 1, 2024
2 parents 00b2e10 + 27f36f4 commit b77bb69
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion builder/dockerfile/copy.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b77bb69

Please sign in to comment.