Skip to content

Commit 56bcc77

Browse files
committed
Handle layers with the same digest in unpacker.
Signed-off-by: Lantao Liu <[email protected]>
1 parent dfd76b3 commit 56bcc77

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

unpacker.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,12 @@ func (u *unpacker) unpack(ctx context.Context, config ocispec.Descriptor, layers
113113
if states[i].layer.Blob.Digest != layer.Digest {
114114
continue
115115
}
116+
// Different layers may have the same digest. When that
117+
// happens, we should continue marking the next layer
118+
// as downloaded.
119+
if states[i].downloaded {
120+
continue
121+
}
116122
states[i].downloaded = true
117123
break
118124
}

0 commit comments

Comments
 (0)