1
0
Fork 0
mirror of https://github.com/restic/restic.git synced 2024-12-22 07:43:03 +00:00

rebuild_index: Report invalid packs that were ignored

This commit is contained in:
Michael Eischer 2020-03-08 01:19:58 +01:00
parent c03bc88b29
commit 90243ed1c4

View file

@ -62,11 +62,17 @@ func rebuildIndex(ctx context.Context, repo restic.Repository, ignorePacks resti
}
bar := newProgressMax(!globalOptions.Quiet, packs-uint64(len(ignorePacks)), "packs")
idx, _, err := index.New(ctx, repo, ignorePacks, bar)
idx, invalidFiles, err := index.New(ctx, repo, ignorePacks, bar)
if err != nil {
return err
}
if globalOptions.verbosity >= 2 {
for _, id := range invalidFiles {
Printf("skipped incomplete pack file: %v\n", id)
}
}
Verbosef("finding old index files\n")
var supersedes restic.IDs