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:
@@ -24,6 +24,9 @@ func (t *textPrinter) Update(p State, duration time.Duration) {
|
||||
allPercent := ui.FormatPercent(p.AllBytesWritten, p.AllBytesTotal)
|
||||
progress := fmt.Sprintf("[%s] %s %v files/dirs %s, total %v files/dirs %v",
|
||||
timeLeft, allPercent, p.FilesFinished, formattedAllBytesWritten, p.FilesTotal, formattedAllBytesTotal)
|
||||
if p.FilesSkipped > 0 {
|
||||
progress += fmt.Sprintf(", skipped %v files/dirs %v", p.FilesSkipped, ui.FormatBytes(p.AllBytesSkipped))
|
||||
}
|
||||
|
||||
t.terminal.SetStatus([]string{progress})
|
||||
}
|
||||
@@ -42,6 +45,9 @@ func (t *textPrinter) Finish(p State, duration time.Duration) {
|
||||
summary = fmt.Sprintf("Summary: Restored %d / %d files/dirs (%s / %s) in %s",
|
||||
p.FilesFinished, p.FilesTotal, formattedAllBytesWritten, formattedAllBytesTotal, timeLeft)
|
||||
}
|
||||
if p.FilesSkipped > 0 {
|
||||
summary += fmt.Sprintf(", skipped %v files/dirs %v", p.FilesSkipped, ui.FormatBytes(p.AllBytesSkipped))
|
||||
}
|
||||
|
||||
t.terminal.Print(summary)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user