[CSHARP-1993] Invalid position setting in the GridFSSeekableDownloadStream with SeekOrigin.End Created: 06/Jun/17  Updated: 28/Oct/23  Resolved: 07/Jun/17

Status: Closed
Project: C# Driver
Component/s: GridFS
Affects Version/s: 2.4.3
Fix Version/s: 2.4.4

Type: Bug Priority: Critical - P2
Reporter: Anatoliy Koperin Assignee: Robert Stam
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Invalid position setting in the GridFSSeekableDownloadStream
https://github.com/mongodb/mongo-csharp-driver/blob/master/src/MongoDB.Driver.GridFS/GridFSSeekableDownloadStream.cs#L128

Should be:
case SeekOrigin.End: newPosition = FileInfo.Length + offset; break;



 Comments   
Comment by Githook User [ 07/Jun/17 ]

Author:

{u'username': u'rstam', u'name': u'rstam', u'email': u'robert@robertstam.org'}

Message: CSHARP-1993: Refactor pull request.
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/275fd1536fc7de3c953af430c4763786f222b9fa

Comment by Githook User [ 07/Jun/17 ]

Author:

{u'name': u'Anatoliy Koperin', u'email': u'a.koperin@smartcat.pro'}

Message: CSHARP-1993: Fix invalid seek in GridFS, more tests added
Branch: master
https://github.com/mongodb/mongo-csharp-driver/commit/e0c1f6c4f808ba1c209e460042bf3be977739aee

Comment by Anatoliy Koperin [ 06/Jun/17 ]

Pull request: https://github.com/mongodb/mongo-csharp-driver/pull/279

Generated at Wed Feb 07 21:41:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.