diff --git a/api/s5/s5.go b/api/s5/s5.go index 259df14..0552402 100644 --- a/api/s5/s5.go +++ b/api/s5/s5.go @@ -1238,8 +1238,10 @@ func (s *S5API) pinEntity(ctx context.Context, userId uint, userIp string, cid * } if !isCidManifest(cid) { - if limitedReader.N >= 0 && uint64(len(data)) != cid.Size { - return nil, false + if limitedReader.N > 0 { + if uint64(len(data)) != cid.Size { + return nil, false + } } } else { dataCont, err := io.ReadAll(res.Body)