mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
builder: patch incomplete download handling
Signed-off-by: Tonis Tiigi <tonistiigi@gmail.com>
This commit is contained in:
parent
ed651e796c
commit
8900e3c758
1 changed files with 3 additions and 0 deletions
|
@ -497,7 +497,10 @@ func (ld *layerDescriptor) Download(ctx context.Context, progressOutput pkgprogr
|
||||||
|
|
||||||
refKey := remotes.MakeRefKey(ctx, ld.desc)
|
refKey := remotes.MakeRefKey(ctx, ld.desc)
|
||||||
|
|
||||||
|
ld.is.ContentStore.Abort(ctx, refKey)
|
||||||
|
|
||||||
if err := content.WriteBlob(ctx, ld.is.ContentStore, refKey, rc, ld.desc.Size, ld.desc.Digest); err != nil {
|
if err := content.WriteBlob(ctx, ld.is.ContentStore, refKey, rc, ld.desc.Size, ld.desc.Digest); err != nil {
|
||||||
|
ld.is.ContentStore.Abort(ctx, refKey)
|
||||||
return nil, 0, err
|
return nil, 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue