Skip to content

Commit bcc3386

Browse files
ginuerzhDivjot Arora
authored andcommitted
GODRIVER-1806 Fix wrong conditional in DownloadStream.Skip (#542)
1 parent 54d5c26 commit bcc3386

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mongo/gridfs/download_stream.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ func (ds *DownloadStream) Skip(skip int64) (int64, error) {
206206

207207
// try to skip whole chunk if possible
208208
toSkip := 0
209-
if skip-skipped < int64(len(ds.buffer)) {
209+
if skip-skipped >= int64(len(ds.buffer)) {
210210
// can skip whole chunk
211211
toSkip = len(ds.buffer)
212212
} else {

0 commit comments

Comments
 (0)