added back anchor and selfheal broken chunks

This commit is contained in:
ston1th 2022-10-09 01:12:05 +02:00
commit 6122768619
8 changed files with 65 additions and 44 deletions

View file

@ -98,8 +98,12 @@ func (f *File) Read(p []byte) (n int, err error) {
if err == io.EOF {
return
}
if err == crypto.ErrDecrypt {
log.V(2).Info("rereading to cache file", "err", err)
return f.readToCache(p)
}
if err != nil {
if !IsIOErr(err) && err != crypto.ErrDecrypt {
if !IsIOErr(err) {
log.Error(err, "error reading cache file")
return
}