Skip to content

Commit

Permalink
composefs: trim / from paths
Browse files Browse the repository at this point in the history
it solves the following error when pulling the alpine image:

mkcomposefs: Parent directory missing for /bin/

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
  • Loading branch information
giuseppe committed Dec 6, 2023
1 parent b7319d4 commit 843af1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/chunked/dump/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ func getStMode(mode uint32, typ string) (uint32, error) {
}

func dumpNode(out io.Writer, links map[string]int, verityDigests map[string]string, entry *internal.FileMetadata) error {
path := entry.Name
path := strings.TrimRight(entry.Name, "/")
if path == "" {
path = "/"
} else if path[0] != '/' {
Expand Down

0 comments on commit 843af1b

Please sign in to comment.