This repository has been archived by the owner on Apr 22, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
No way to unwatchFile a specific callback #3660
Comments
Oh, and I'd be happy to write a patch! |
bnoordhuis
added a commit
to bnoordhuis/node
that referenced
this issue
Jul 8, 2012
Before this commit, `fs.unwatchFile(path)` removed *all* listeners for `path`. The function is overloaded now: `fs.unwatchFile(path)` still removes all listeners, but `fs.unwatchFile(path, cb)` lets you remove a specific listener. Fixes nodejs#3660.
Fair point. Can someone review bnoordhuis/node@v0.8...issue3660 ? It's against v0.8 because I consider it a bug fix. If someone strongly objects and has the arguments to back it up, I don't mind landing it in master. |
@bnoordhuis I agree, this is a bug. Also, it's marked unstable, and is marked for future deprecation, and this is not a breaking change. LGTM. |
Thanks. Landed in 5b5362a. |
Thanks! |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
When calling unwatchFile, it seems that all callbacks will no longer be fired. This is bad because:
I'm not sure how to address this without breaking this API. I'm not sure what 3 - Stable precisely means, but is it possible to add an optional extra parameter for a callback?
The text was updated successfully, but these errors were encountered: