mirror of
https://github.com/restic/restic.git
synced 2026-10-25 01:58:54 +00:00
restore: add deletions to progress output
This commit is contained in:
1 parent
f4b15fdd96
commit
aa8e18cf32
8 files changed
+24
-3
No files matched your search
@@ -51,6 +51,7 @@ const (
|
||||
ActionFileRestored ItemAction = "file restored"
|
||||
ActionFileUpdated ItemAction = "file updated"
|
||||
ActionFileUnchanged ItemAction = "file unchanged"
|
||||
ActionDeleted ItemAction = "deleted"
|
||||
)
|
||||
|
||||
func NewProgress(printer ProgressPrinter, interval time.Duration) *Progress {
|
||||
@@ -126,6 +127,17 @@ func (p *Progress) AddSkippedFile(name string, size uint64) {
|
||||
p.printer.CompleteItem(ActionFileUnchanged, name, size)
|
||||
}
|
||||
|
||||
func (p *Progress) ReportDeletedFile(name string) {
|
||||
if p == nil {
|
||||
return
|
||||
}
|
||||
|
||||
p.m.Lock()
|
||||
defer p.m.Unlock()
|
||||
|
||||
p.printer.CompleteItem(ActionDeleted, name, 0)
|
||||
}
|
||||
|
||||
func (p *Progress) Finish() {
|
||||
p.updater.Done()
|
||||
}
|
||||
Reference in new issue
Block a user