Skip to content

fs: fix fs.readFile, fs.exists{Sync} regression caused by assertions

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)

fs

Refs: https://github.com/nodejs/node/pull/17667

https://github.com/nodejs/node/pull/17667 didn't include the path validation of these methods in JS land, so passing undefined as paths to them would go straight to assertions, which caused CITGM regression https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/1165/ . This PR fixes that by adding those validations back.

Merge request reports

Loading