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:Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Sam Roberts <vieuxtech@gmail.com>
parent
f18b4632
Please register or sign in to comment