Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

fs: Fix StatWatcher to handle error codes passed in status #25469

Closed
wants to merge 2 commits into from

Conversation

dnakamura
Copy link

fixes #25345

@cjihrig
Copy link

cjihrig commented Jun 1, 2015

Can you add a test?

brendanashworth pushed a commit to brendanashworth/io.js that referenced this pull request Jun 22, 2015
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: nodejs/node-v0.x-archive#25469
Fixes: nodejs#1745
@misterdjules misterdjules modified the milestones: 0.12.5, 0.12.6 Jun 22, 2015
@dnakamura
Copy link
Author

@cjihrig Tests are added, can you take a look?

@cjihrig
Copy link

cjihrig commented Jul 6, 2015

It looks like io.js started to go down this path in nodejs/node#2028, but decided against it. The current proposed fix is in nodejs/node#2093. I think we should try to stay consistent with io.js in this case.

@cjihrig cjihrig closed this Jul 6, 2015
@misterdjules misterdjules modified the milestones: 0.12.6, 0.12.7 Jul 6, 2015
@thefourtheye
Copy link

@cjihrig Strictly speaking, nodejs/node#2093 is not a fix for this, it simply makes this as a documented feature :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants