Add more error handling

This commit is contained in:
Alexander Neumann 2021-01-30 19:35:46 +01:00
parent aef3658a5f
commit 0858fbf6aa
23 changed files with 91 additions and 36 deletions

View file

@ -52,7 +52,7 @@ func DefaultLoad(ctx context.Context, h restic.Handle, length int, offset int64,
}
err = fn(rd)
if err != nil {
rd.Close() // ignore secondary errors closing the reader
_ = rd.Close() // ignore secondary errors closing the reader
return err
}
return rd.Close()