Skip to content

src: remove 2nd `undefined` argument in node_file.cc

Rodrigo Muino Tomonari requested to merge github/fork/dankang/fs-callback into master

In the document for fs, there are several functions that state "No arguments other than a possible exception are given to the completion callback." (ex> fs.access, fs.chmod, fs.close, ..)

But, the functions are invoking the callback with two parameters (err, undefined)

It causes problems in using several API like async.waterfall.

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

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows [commit guidelines]

Merge request reports

Loading