fix: only say we have the file if no error

This commit is contained in:
Derrick Hammer 2024-02-29 09:55:51 -05:00
parent 64f52a87bd
commit e32a9b2070
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 1 additions and 2 deletions

View File

@ -4,7 +4,6 @@ import (
"context" "context"
"crypto/ed25519" "crypto/ed25519"
"crypto/sha256" "crypto/sha256"
"errors"
"fmt" "fmt"
"io" "io"
"time" "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 return true
} }
} }