2
2
mirror of https://github.com/octoleo/restic.git synced 2024-09-28 22:49:01 +00:00

Progress: Call OnUpdate before OnDone

This commit is contained in:
Alexander Neumann 2016-08-15 20:15:17 +02:00
parent 009c803c8a
commit 3ceb2ad3cf
2 changed files with 1 additions and 1 deletions

View File

@ -55,7 +55,6 @@ func newProgressMax(show bool, max uint64, description string) *restic.Progress
}
p.OnDone = func(s restic.Stat, d time.Duration, ticker bool) {
p.OnUpdate(s, d, false)
fmt.Printf("\n")
}

View File

@ -152,6 +152,7 @@ func (p *Progress) Done() {
if p.OnDone != nil {
p.fnM.Lock()
p.OnUpdate(cur, time.Since(p.start), false)
p.OnDone(cur, time.Since(p.start), false)
p.fnM.Unlock()
}