diff --git a/internal/ui/restore/text.go b/internal/ui/restore/text.go index 35c9db029..f65a8cff9 100644 --- a/internal/ui/restore/text.go +++ b/internal/ui/restore/text.go @@ -25,10 +25,10 @@ func (t *textPrinter) Update(p State, duration time.Duration) { formattedAllBytesWritten := ui.FormatBytes(p.AllBytesWritten) formattedAllBytesTotal := ui.FormatBytes(p.AllBytesTotal) allPercent := ui.FormatPercent(p.AllBytesWritten, p.AllBytesTotal) - progress := fmt.Sprintf("[%s] %s %v files/dirs %s, total %v files/dirs %v", + progress := fmt.Sprintf("[%s] %s %v files/dirs %s, total %v files/dirs %s", 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)) + progress += fmt.Sprintf(", skipped %v files/dirs %s", p.FilesSkipped, ui.FormatBytes(p.AllBytesSkipped)) } if p.FilesDeleted > 0 { progress += fmt.Sprintf(", deleted %v files/dirs", p.FilesDeleted) @@ -83,7 +83,7 @@ func (t *textPrinter) Finish(p State, duration time.Duration) { 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)) + summary += fmt.Sprintf(", skipped %v files/dirs (%s)", p.FilesSkipped, ui.FormatBytes(p.AllBytesSkipped)) } if p.FilesDeleted > 0 { summary += fmt.Sprintf(", deleted %v files/dirs", p.FilesDeleted) diff --git a/internal/ui/restore/text_test.go b/internal/ui/restore/text_test.go index 746700cd8..f2f41dffa 100644 --- a/internal/ui/restore/text_test.go +++ b/internal/ui/restore/text_test.go @@ -42,7 +42,7 @@ func TestPrintSummaryOnErrors(t *testing.T) { func TestPrintSummaryOnSuccessWithSkipped(t *testing.T) { term, printer := createTextProgress() printer.Finish(State{11, 11, 2, 0, 47, 47, 59}, 5*time.Second) - test.Equals(t, []string{"Summary: Restored 11 files/dirs (47 B) in 0:05, skipped 2 files/dirs 59 B"}, term.Output) + test.Equals(t, []string{"Summary: Restored 11 files/dirs (47 B) in 0:05, skipped 2 files/dirs (59 B)"}, term.Output) } func TestPrintCompleteItem(t *testing.T) {