From 843af1b24ec7c0aa9f144eab8de8b825ef9a255a Mon Sep 17 00:00:00 2001 From: Giuseppe Scrivano Date: Wed, 6 Dec 2023 11:43:10 +0100 Subject: [PATCH] composefs: trim / from paths it solves the following error when pulling the alpine image: mkcomposefs: Parent directory missing for /bin/ Signed-off-by: Giuseppe Scrivano --- pkg/chunked/dump/dump.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/chunked/dump/dump.go b/pkg/chunked/dump/dump.go index a08928034a..5e569682a6 100644 --- a/pkg/chunked/dump/dump.go +++ b/pkg/chunked/dump/dump.go @@ -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] != '/' {