Skip to content

Commit

Permalink
mirror: fix progress bar is not accurate (#2284)
Browse files Browse the repository at this point in the history
  • Loading branch information
nexustar authored Sep 25, 2023
1 parent f3b0806 commit 1c9c153
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 1 deletion.
1 change: 1 addition & 0 deletions pkg/repository/mirror.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ L:
}
progress.SetCurrent(resp.BytesComplete())
case <-resp.Done:
progress.SetCurrent(resp.BytesComplete())
progress.Finish()
break L
}
Expand Down
1 change: 0 additions & 1 deletion pkg/repository/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,5 @@ func (p *ProgressBar) SetCurrent(size int64) {

// Finish implement the DownloadProgress interface
func (p *ProgressBar) Finish() {
p.bar.SetCurrent(p.size)
p.bar.Finish()
}

0 comments on commit 1c9c153

Please sign in to comment.