Skip to content
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

doc, src: improve default read length #40347

Closed
wants to merge 2 commits into from

Conversation

wbt
Copy link
Contributor

@wbt wbt commented Oct 6, 2021

This commit sets the default length of bytes to read to a value
that doesn't throw an error in the absence of another optional option.

I'm not 100% sure if there are additional places in the code or
documentation which should also be updated due to repetition.

Currently, specifying an `offset` without a `length` throws an ERR_OUT_OF_RANGE error.  This provides a more sensible default.
This change should only affect cases where no length is specified and a nonzero offset is, which are currently throwing errors.
Not 100% sure if this is all of them.
@nodejs-github-bot nodejs-github-bot added fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run. labels Oct 6, 2021
@wbt wbt changed the title doc,src: Improve default read length doc, src: improve default read length Oct 6, 2021
@wbt
Copy link
Contributor Author

wbt commented Oct 6, 2021

Apologies that I hadn't read the commit message requirements until after making these two commits; GitHub does not make editing commit messages easy.

@wbt
Copy link
Contributor Author

wbt commented Oct 6, 2021

Superseded by #40349.

@wbt wbt closed this Oct 6, 2021
@wbt wbt deleted the improve-default-read-length branch October 6, 2021 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fs Issues and PRs related to the fs subsystem / file system. needs-ci PRs that need a full CI run.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants