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 {
|
||||
return printer.NewCounter("old indexes deleted")
|
||||
},
|
||||
DeleteReport: func(id restic.ID, _ error) {
|
||||
printer.VV("removed index %v\n", id.String())
|
||||
DeleteReport: func(id restic.ID, err error) {
|
||||
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,
|
||||
})
|
||||
|
|
Loading…
Reference in a new issue