forked from TrueCloudLab/restic
Progress: Call OnUpdate before OnDone
This commit is contained in:
parent
009c803c8a
commit
3ceb2ad3cf
2 changed files with 1 additions and 1 deletions
|
@ -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")
|
||||
}
|
||||
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue