mirror of
https://github.com/restic/restic.git
synced 2026-10-17 15:08:12 +00:00
check: consider split pack index entries as repository damage
This commit is contained in:
1 parent
5b39ad861e
commit
78b3411076
2 files changed
+35
-3
No files matched your search
@@ -261,8 +261,15 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts global.Options, args
|
||||
}
|
||||
|
||||
errorsFound := false
|
||||
salvagePacks := restic.NewIDSet()
|
||||
|
||||
for _, hint := range hints {
|
||||
switch hint.(type) {
|
||||
switch hint := hint.(type) {
|
||||
case *repository.ErrIncompletePackEntry:
|
||||
printer.E("%s", hint.Error())
|
||||
salvagePacks.Insert(hint.PackID)
|
||||
errorsFound = true
|
||||
summary.NumErrors++
|
||||
case *repository.ErrDuplicatePacks:
|
||||
printer.S("%s", hint.Error())
|
||||
summary.HintRepairIndex = true
|
||||
@@ -295,7 +302,6 @@ func runCheck(ctx context.Context, opts CheckOptions, gopts global.Options, args
|
||||
|
||||
orphanedPacks := 0
|
||||
errChan := make(chan error)
|
||||
salvagePacks := restic.NewIDSet()
|
||||
|
||||
printer.P("check all packs\n")
|
||||
go chkr.Packs(ctx, errChan)
|
||||
|
||||
Reference in new issue
Block a user