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()
}