Skip to content

Commit

Permalink
Skip "." when generating tar
Browse files Browse the repository at this point in the history
  • Loading branch information
A2uria committed Jun 29, 2024
1 parent 9ce9cc3 commit 7caf253
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/v1/mutate/mutate.go
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,11 @@ func extract(img v1.Image, w io.Writer) error {
// name, we may have duplicate entries, which angers tar-split.
header.Name = filepath.Clean(header.Name)
header.Name = filepath.ToSlash(header.Name)

if header.Name == "." {
continue
}

// force PAX format to remove Name/Linkname length limit of 100 characters
// required by USTAR and to not depend on internal tar package guess which
// prefers USTAR over PAX
Expand Down

0 comments on commit 7caf253

Please sign in to comment.