From 7c8dd61e8c815c44d1ac13fad65214539e47b4f0 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Wed, 28 Dec 2022 12:15:39 +0100 Subject: [PATCH] repair snapshots: cleanup warnings --- cmd/restic/cmd_repair_snapshots.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmd/restic/cmd_repair_snapshots.go b/cmd/restic/cmd_repair_snapshots.go index 58da8132a..e50d34b9d 100644 --- a/cmd/restic/cmd_repair_snapshots.go +++ b/cmd/restic/cmd_repair_snapshots.go @@ -130,11 +130,12 @@ func runRepairSnapshots(ctx context.Context, gopts GlobalOptions, opts RepairOpt }, RewriteFailedTree: func(nodeID restic.ID, path string, _ error) (restic.ID, error) { if path == "/" { + Verbosef(" dir %q: not readable\n", path) // remove snapshots with invalid root node return restic.ID{}, nil } // If a subtree fails to load, remove it - Printf("removed defective dir '%v'", path) + Verbosef(" dir %q: replaced with empty directory\n", path) emptyID, err := restic.SaveTree(ctx, repo, &restic.Tree{}) if err != nil { return restic.ID{}, err