Skip to content

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.

wbt added 2 commits October 6, 2021 08:43
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