fix progress bar update on final render

This commit is contained in:
Shane C. 2024-12-10 07:52:07 -05:00
parent 528a667489
commit 7e15092e97
Signed by: Shane C.
GPG key ID: E46B5FEA35B22FF9

View file

@ -50,7 +50,7 @@ func (p *ProgressBar) render(final bool) {
numBlank := 40 - numFilled numBlank := 40 - numFilled
donePercent := math.Round(float64(p.currentBytes) / float64(p.maxBytes) * 100) donePercent := math.Round(float64(p.currentBytes) / float64(p.maxBytes) * 100)
if int(donePercent) == p.currentPercent { if int(donePercent) == p.currentPercent && !final {
return return
} }
p.currentPercent = int(donePercent) p.currentPercent = int(donePercent)