possible fix for rare panic
This commit is contained in:
parent
f0af1fb04d
commit
88861102fd
4 changed files with 20 additions and 17 deletions
|
|
@ -4,6 +4,7 @@ package fs
|
|||
|
||||
import (
|
||||
"cachefs/pkg/provider"
|
||||
"cachefs/pkg/provider/crypto"
|
||||
"context"
|
||||
"errors"
|
||||
"io"
|
||||
|
|
@ -95,13 +96,13 @@ func (f *File) Read(p []byte) (n int, err error) {
|
|||
return
|
||||
}
|
||||
if err != nil {
|
||||
if !IsIOErr(err) {
|
||||
if !IsIOErr(err) && err != crypto.ErrDecrypt {
|
||||
log.Error(err, "error reading cache file")
|
||||
return
|
||||
}
|
||||
n, err = f.readSource(p)
|
||||
if err != nil {
|
||||
log.Error(err, "error reading source file")
|
||||
log.Error(err, "error reading fallback source file")
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue