Skip to content

Commit 1c9c153

Browse files
authored
mirror: fix progress bar is not accurate (#2284)
1 parent f3b0806 commit 1c9c153

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

pkg/repository/mirror.go

+1
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,7 @@ L:
335335
}
336336
progress.SetCurrent(resp.BytesComplete())
337337
case <-resp.Done:
338+
progress.SetCurrent(resp.BytesComplete())
338339
progress.Finish()
339340
break L
340341
}

pkg/repository/progress.go

-1
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,5 @@ func (p *ProgressBar) SetCurrent(size int64) {
5252

5353
// Finish implement the DownloadProgress interface
5454
func (p *ProgressBar) Finish() {
55-
p.bar.SetCurrent(p.size)
5655
p.bar.Finish()
5756
}

0 commit comments

Comments
 (0)