Skip to content

fs: fix StatWatcher to handle error codes

Previously, fs.watchFile() would call the callback even if the file does not exist. This is erroneous and is fixed by correctly handling the error code provided.

Ref: https://github.com/joyent/node/pull/25469 Fixes: https://github.com/nodejs/io.js/issues/1745

CI: https://jenkins-iojs.nodesource.com/job/iojs+any-pr+multi/65/ I just grabbed the commit from joyent/node and doctored it up to fit the new code guidelines for io.js (just the test), squashed and redid the commit log. A note to reviewers: fs.watchFile is not covered at all by the test suite, do not rely on that for checking backwards compatibility.

Merge request reports

Loading