mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #42515 from geaaru/permit-override-name
ReplaceFileTarWrapper: permit to override file name
This commit is contained in:
commit
301be64d41
1 changed files with 3 additions and 1 deletions
|
@ -278,7 +278,9 @@ func ReplaceFileTarWrapper(inputTarStream io.ReadCloser, mods map[string]TarModi
|
|||
return nil
|
||||
}
|
||||
|
||||
header.Name = name
|
||||
if header.Name == "" {
|
||||
header.Name = name
|
||||
}
|
||||
header.Size = int64(len(data))
|
||||
if err := tarWriter.WriteHeader(header); err != nil {
|
||||
return err
|
||||
|
|
Loading…
Reference in a new issue