Skip to content

Commit cde03a0

Browse files
authored
Merge pull request #3583 from Random-Liu/handle-duplicated-layer
Handle layers with the same digest in unpacker.
2 parents df84e54 + 56bcc77 commit cde03a0

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)