mirror of
https://github.com/octoleo/restic.git
synced 2024-11-23 21:27:34 +00:00
check: suggest repair pack for all damaged packs
This commit is contained in:
parent
772e3416d1
commit
544fe38786
@ -336,11 +336,9 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts GlobalOptions, args
|
|||||||
errorsFound = true
|
errorsFound = true
|
||||||
Warnf("%v\n", err)
|
Warnf("%v\n", err)
|
||||||
if err, ok := err.(*checker.ErrPackData); ok {
|
if err, ok := err.(*checker.ErrPackData); ok {
|
||||||
if strings.Contains(err.Error(), "wrong data returned, hash is") {
|
|
||||||
salvagePacks = append(salvagePacks, err.PackID)
|
salvagePacks = append(salvagePacks, err.PackID)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
p.Done()
|
p.Done()
|
||||||
|
|
||||||
if len(salvagePacks) > 0 {
|
if len(salvagePacks) > 0 {
|
||||||
|
Loading…
Reference in New Issue
Block a user