mirror of
https://github.com/restic/restic.git
synced 2026-11-19 23:01:08 +00:00
restorer: separately track skipped files
This commit is contained in:
1 parent
64b7b6b975
commit
e47e08a688
8 files changed
+94
-30
No files matched your search
@@ -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