diff --git a/internal/restorer/restorer.go b/internal/restorer/restorer.go index 3f41b79a6..cd3fd076d 100644 --- a/internal/restorer/restorer.go +++ b/internal/restorer/restorer.go @@ -278,7 +278,7 @@ func (res *Restorer) restoreNodeTo(ctx context.Context, node *restic.Node, targe } } - res.opts.Progress.AddProgress(location, restoreui.ActionFileRestored, 0, 0) + res.opts.Progress.AddProgress(location, restoreui.ActionOtherRestored, 0, 0) return res.restoreNodeMetadataTo(node, target, location) } @@ -305,7 +305,7 @@ func (res *Restorer) restoreHardlinkAt(node *restic.Node, target, path, location } } - res.opts.Progress.AddProgress(location, restoreui.ActionFileRestored, 0, 0) + res.opts.Progress.AddProgress(location, restoreui.ActionOtherRestored, 0, 0) // TODO investigate if hardlinks have separate metadata on any supported system return res.restoreNodeMetadataTo(node, path, location) } diff --git a/internal/ui/restore/json.go b/internal/ui/restore/json.go index 7db2e21a3..c248a7951 100644 --- a/internal/ui/restore/json.go +++ b/internal/ui/restore/json.go @@ -52,6 +52,8 @@ func (t *jsonPrinter) CompleteItem(messageType ItemAction, item string, size uin action = "restored" case ActionFileRestored: action = "restored" + case ActionOtherRestored: + action = "restored" case ActionFileUpdated: action = "updated" case ActionFileUnchanged: diff --git a/internal/ui/restore/progress.go b/internal/ui/restore/progress.go index 71a46e9dd..67b15f07e 100644 --- a/internal/ui/restore/progress.go +++ b/internal/ui/restore/progress.go @@ -51,6 +51,7 @@ const ( ActionFileRestored ItemAction = "file restored" ActionFileUpdated ItemAction = "file updated" ActionFileUnchanged ItemAction = "file unchanged" + ActionOtherRestored ItemAction = "other restored" ActionDeleted ItemAction = "deleted" ) diff --git a/internal/ui/restore/text.go b/internal/ui/restore/text.go index 235e7f085..ec512f369 100644 --- a/internal/ui/restore/text.go +++ b/internal/ui/restore/text.go @@ -44,6 +44,8 @@ func (t *textPrinter) CompleteItem(messageType ItemAction, item string, size uin action = "restored" case ActionFileRestored: action = "restored" + case ActionOtherRestored: + action = "restored" case ActionFileUpdated: action = "updated" case ActionFileUnchanged: @@ -54,7 +56,7 @@ func (t *textPrinter) CompleteItem(messageType ItemAction, item string, size uin panic("unknown message type") } - if messageType == ActionDirRestored || messageType == ActionDeleted { + if messageType == ActionDirRestored || messageType == ActionOtherRestored || messageType == ActionDeleted { t.terminal.Print(fmt.Sprintf("%-9v %v", action, item)) } else { t.terminal.Print(fmt.Sprintf("%-9v %v with size %v", action, item, ui.FormatBytes(size))) diff --git a/internal/ui/restore/text_test.go b/internal/ui/restore/text_test.go index eddc0d1ca..b198a27df 100644 --- a/internal/ui/restore/text_test.go +++ b/internal/ui/restore/text_test.go @@ -63,6 +63,7 @@ func TestPrintCompleteItem(t *testing.T) { }{ {ActionDirRestored, 0, "restored test"}, {ActionFileRestored, 123, "restored test with size 123 B"}, + {ActionOtherRestored, 0, "restored test"}, {ActionFileUpdated, 123, "updated test with size 123 B"}, {ActionFileUnchanged, 123, "unchanged test with size 123 B"}, {ActionDeleted, 0, "deleted test"},