Skip to content

fs: create consistent behavior for fs module across platforms

Rodrigo Muino Tomonari requested to merge github/fork/timotew/master into master

In Windows, if a file name ends with forward slash /, fs interprets it as regular file (like there is no slash at all) and does not throw any errors. In Linux it throws error but not in Windows.

Fixes: https://github.com/nodejs/node/issues/17801

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

Merge request reports

Loading