From c5775cf73d0e993625a688454ae158335aac6e94 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Tue, 26 Feb 2019 15:26:12 +0000 Subject: [PATCH] fserrors: don't panic on uncomparable errors --- fs/fserrors/error.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/fserrors/error.go b/fs/fserrors/error.go index a2ede7416..39fd9fb64 100644 --- a/fs/fserrors/error.go +++ b/fs/fserrors/error.go @@ -194,7 +194,7 @@ func Cause(cause error) (retriable bool, err error) { // this case. err = prev } - if err == prev { + if reflect.DeepEqual(err, prev) { // Unpack any struct or *struct with a field // of name Err which satisfies the error // interface. This includes *url.Error, @@ -215,7 +215,7 @@ func Cause(cause error) (retriable bool, err error) { } } } - if err == prev { + if reflect.DeepEqual(err, prev) { break } }