Skip to content

Commit

Permalink
Merge pull request #2121 from giuseppe/fix-progress-with-partial-images
Browse files Browse the repository at this point in the history
progress: set Current before Refill
  • Loading branch information
mtrmac committed Sep 18, 2023
2 parents 13fcff5 + 76a421e commit 83f3807
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion copy/single.go
Original file line number Diff line number Diff line change
Expand Up @@ -743,7 +743,9 @@ func (ic *imageCopier) copyLayer(ctx context.Context, srcInfo types.BlobInfo, to
uploadedBlob, err := ic.c.dest.PutBlobPartial(ctx, &proxy, srcInfo, ic.c.blobInfoCache)
if err == nil {
if srcInfo.Size != -1 {
bar.SetRefill(srcInfo.Size - bar.Current())
refill := srcInfo.Size - bar.Current()
bar.SetCurrent(srcInfo.Size)
bar.SetRefill(refill)
}
bar.mark100PercentComplete()
hideProgressBar = false
Expand Down

0 comments on commit 83f3807

Please sign in to comment.