diff --git a/util/oci/client.go b/util/oci/client.go index 706394961a6207..6aa1f2afeba621 100644 --- a/util/oci/client.go +++ b/util/oci/client.go @@ -12,6 +12,7 @@ import ( "math" "net/http" "os" + "path" "path/filepath" "slices" "strings" @@ -390,6 +391,12 @@ func saveCompressedImageToPath(ctx context.Context, digest string, repo oras.Rea return err } + // Remove redundant ingest folder; this is an artifact from the oras.Copy call above + err = os.RemoveAll(path.Join(tempDir, "ingest")) + if err != nil { + return err + } + // Save contents to tar file return createTarFile(tempDir, cachedPath) }