Commit 4444e731 authored by Nikolai Vavilov's avatar Nikolai Vavilov Committed by GitHub
Browse files

fs: ensure readFile[Sync] reads from the beginning

It would previously read from the current file position, which can be
non-zero if the `fd` has been read from or written to. This contradicts
the documentation which states that it "reads the entire contents of a
file".

PR-URL: https://github.com/nodejs/node/pull/9699
Fixes: https://github.com/nodejs/node/issues/9671


Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarSam Roberts <vieuxtech@gmail.com>
parent f18b4632
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment