mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 12:36:38 +08:00
fserrors: Look deeper into errors for Fatal/Retry/NoRetry errors.
Before this change fatal errors which were wrapped in a system error (eg a URLError) were not recognised as fatal errors.
This commit is contained in:
parent
be79b47a7a
commit
f95835d613
|
@ -69,7 +69,7 @@ func IsRetryError(err error) bool {
|
|||
if err == nil {
|
||||
return false
|
||||
}
|
||||
err = errors.Cause(err)
|
||||
_, err = Cause(err)
|
||||
if r, ok := err.(Retrier); ok {
|
||||
return r.Retry()
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ func IsFatalError(err error) bool {
|
|||
if err == nil {
|
||||
return false
|
||||
}
|
||||
err = errors.Cause(err)
|
||||
_, err = Cause(err)
|
||||
if r, ok := err.(Fataler); ok {
|
||||
return r.Fatal()
|
||||
}
|
||||
|
@ -159,7 +159,7 @@ func IsNoRetryError(err error) bool {
|
|||
if err == nil {
|
||||
return false
|
||||
}
|
||||
err = errors.Cause(err)
|
||||
_, err = Cause(err)
|
||||
if r, ok := err.(NoRetrier); ok {
|
||||
return r.NoRetry()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user