Ignore invalid index files, print warning

This commit is contained in:
Alexander Neumann 2017-10-05 20:39:53 +02:00
parent d81adcfaa5
commit d886bc6c48

View file

@ -378,7 +378,8 @@ func (r *Repository) LoadIndex(ctx context.Context) error {
worker := func(ctx context.Context, id restic.ID) error { worker := func(ctx context.Context, id restic.ID) error {
idx, err := LoadIndex(ctx, r, id) idx, err := LoadIndex(ctx, r, id)
if err != nil { if err != nil {
return err fmt.Fprintf(os.Stderr, "%v, ignoring\n", err)
return nil
} }
select { select {