mirror of
https://github.com/restic/restic.git
synced 2025-08-20 07:17:31 +00:00
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:
@@ -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,
|
||||
})
|
||||
|
Reference in New Issue
Block a user