Skip to content

Commit a928190

Browse files
committed
fix: s3 query offset
1 parent b185709 commit a928190

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

s3.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,8 @@ func (s *S3Bucket) Query(q dsq.Query) (dsq.Results, error) {
215215

216216
sent := 0
217217
queryLimit := func() int64 {
218-
if max := q.Limit - sent; q.Limit <= 0 && max < listMax {
219-
return int64(max)
218+
if q.Limit > 0 && (q.Limit-sent) < listMax {
219+
return int64(q.Limit - sent)
220220
}
221221
return listMax
222222
}

0 commit comments

Comments
 (0)