1
0
Fork 0
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:
Tonis Tiigi 2018-05-17 15:47:33 -07:00
parent ed651e796c
commit 8900e3c758

View file

@ -497,7 +497,10 @@ func (ld *layerDescriptor) Download(ctx context.Context, progressOutput pkgprogr
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 {
ld.is.ContentStore.Abort(ctx, refKey)
return nil, 0, err
}