-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs: fix length
option being ignored during read()
#40906
Conversation
Currently, `length` in an options object is ignored.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs a test
Thanks for sending this PR, this looks indeed like an oversight. Can you please add test cases in |
Co-authored-by: Robert Nagy <ronagy@icloud.com>
@nodejs/fs |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a test case where length is 0
?
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
This comment has been minimized.
This comment has been minimized.
Landed in 10493b4 |
Currently, `length` in an options object is ignored. PR-URL: #40906 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Currently, `length` in an options object is ignored. PR-URL: #40906 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Currently, `length` in an options object is ignored. PR-URL: #40906 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Currently, `length` in an options object is ignored. PR-URL: #40906 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Currently, `length` in an options object is ignored. PR-URL: nodejs#40906 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Currently, `length` in an options object is ignored. PR-URL: #40906 Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Currently, calling read() with an options object always uses
buffer.byteLength
, ignoringlength
in the object.First time opening a PR here, please let me know if anything doesn't conform to the guidelines.