forked from TrueCloudLab/restic
repair index: improve log output if index cannot be deleted
The operation will always fail with an error if an index cannot be deleted. Thus, this change is purely cosmetic.
This commit is contained in:
parent
7d1b9cde34
commit
310db03c0e
1 changed files with 6 additions and 2 deletions
|
@ -110,8 +110,12 @@ func rebuildIndexFiles(ctx context.Context, repo restic.Repository, removePacks
|
||||||
DeleteProgress: func() *progress.Counter {
|
DeleteProgress: func() *progress.Counter {
|
||||||
return printer.NewCounter("old indexes deleted")
|
return printer.NewCounter("old indexes deleted")
|
||||||
},
|
},
|
||||||
DeleteReport: func(id restic.ID, _ error) {
|
DeleteReport: func(id restic.ID, err error) {
|
||||||
printer.VV("removed index %v\n", id.String())
|
if err != nil {
|
||||||
|
printer.VV("failed to remove index %v: %v\n", id.String(), err)
|
||||||
|
} else {
|
||||||
|
printer.VV("removed index %v\n", id.String())
|
||||||
|
}
|
||||||
},
|
},
|
||||||
SkipDeletion: skipDeletion,
|
SkipDeletion: skipDeletion,
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Reference in a new issue