From e32a9b207057764dd52c437fba97b23935815f9c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 29 Feb 2024 09:55:51 -0500 Subject: [PATCH] fix: only say we have the file if no error --- protocols/s5/s5.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/protocols/s5/s5.go b/protocols/s5/s5.go index a644058..eacdf65 100644 --- a/protocols/s5/s5.go +++ b/protocols/s5/s5.go @@ -4,7 +4,6 @@ import ( "context" "crypto/ed25519" "crypto/sha256" - "errors" "fmt" "io" "time" @@ -257,7 +256,7 @@ func (s S5ProviderStore) CanProvide(hash *encoding.Multihash, kind []types.Stora } } - if _, err := s.metadata.GetUpload(ctx, rawHash); errors.Is(err, metadata.ErrNotFound) { + if _, err := s.metadata.GetUpload(ctx, rawHash); err == nil { return true } }