always cleanup blob download (#747)

This commit is contained in:
Jeffrey Morgan 2023-10-10 13:12:29 -04:00 committed by GitHub
parent 0040f543a2
commit 65dcd0ce35
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -314,6 +314,7 @@ func downloadBlob(ctx context.Context, opts downloadOpts) error {
requestURL := opts.mp.BaseURL() requestURL := opts.mp.BaseURL()
requestURL = requestURL.JoinPath("v2", opts.mp.GetNamespaceRepository(), "blobs", opts.digest) requestURL = requestURL.JoinPath("v2", opts.mp.GetNamespaceRepository(), "blobs", opts.digest)
if err := download.Prepare(ctx, requestURL, opts.regOpts); err != nil { if err := download.Prepare(ctx, requestURL, opts.regOpts); err != nil {
blobDownloadManager.Delete(opts.digest)
return err return err
} }