Skip to content

Commit

Permalink
Merge pull request #2 from about14sheep/offsetError
Browse files Browse the repository at this point in the history
update end of file check to adjust for aws s3  byte range offset
  • Loading branch information
about14sheep authored Nov 5, 2022
2 parents 66033df + a3b5593 commit fa072cf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "s3-readstream",
"version": "1.1.1",
"version": "1.1.2",
"description": "Drop in AWS S3 replacement read stream",
"main": "dist/S3Readstream.js",
"types": "dist/S3Readstream.d.js",
Expand Down
2 changes: 1 addition & 1 deletion src/S3Readstream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export class S3ReadStream extends Readable {
}

_read() {
if (this._currentCursorPosition > this._maxContentLength) {
if (this._currentCursorPosition >= this._maxContentLength) {
this.push(null);
} else {
const range = this._currentCursorPosition + this._s3DataRange;
Expand Down

0 comments on commit fa072cf

Please sign in to comment.