diff --git a/pkg/archive/archive.go b/pkg/archive/archive.go index 50b83c62c6..38cba551a8 100644 --- a/pkg/archive/archive.go +++ b/pkg/archive/archive.go @@ -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