mirror of
https://github.com/restic/restic.git
synced 2025-12-12 05:11:46 +00:00
restore: add deletions to progress output
This commit is contained in:
@@ -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