mirror of
https://github.com/octoleo/restic.git
synced 2024-11-16 18:15:20 +00:00
Progress: Call OnUpdate before OnDone
This commit is contained in:
parent
009c803c8a
commit
3ceb2ad3cf
@ -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.OnDone = func(s restic.Stat, d time.Duration, ticker bool) {
|
||||||
p.OnUpdate(s, d, false)
|
|
||||||
fmt.Printf("\n")
|
fmt.Printf("\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -152,6 +152,7 @@ func (p *Progress) Done() {
|
|||||||
|
|
||||||
if p.OnDone != nil {
|
if p.OnDone != nil {
|
||||||
p.fnM.Lock()
|
p.fnM.Lock()
|
||||||
|
p.OnUpdate(cur, time.Since(p.start), false)
|
||||||
p.OnDone(cur, time.Since(p.start), false)
|
p.OnDone(cur, time.Since(p.start), false)
|
||||||
p.fnM.Unlock()
|
p.fnM.Unlock()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user