mirror of
https://github.com/restic/restic.git
synced 2025-12-11 18:47:50 +00:00
restorer: separately track skipped files
This commit is contained in:
@@ -10,8 +10,10 @@ import (
|
||||
type State struct {
|
||||
FilesFinished uint64
|
||||
FilesTotal uint64
|
||||
FilesSkipped uint64
|
||||
AllBytesWritten uint64
|
||||
AllBytesTotal uint64
|
||||
AllBytesSkipped uint64
|
||||
}
|
||||
|
||||
type Progress struct {
|
||||
@@ -97,6 +99,18 @@ func (p *Progress) AddProgress(name string, bytesWrittenPortion uint64, bytesTot
|
||||
}
|
||||
}
|
||||
|
||||
func (p *Progress) AddSkippedFile(size uint64) {
|
||||
if p == nil {
|
||||
return
|
||||
}
|
||||
|
||||
p.m.Lock()
|
||||
defer p.m.Unlock()
|
||||
|
||||
p.s.FilesSkipped++
|
||||
p.s.AllBytesSkipped += size
|
||||
}
|
||||
|
||||
func (p *Progress) Finish() {
|
||||
p.updater.Done()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user