-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs.watch(): reports delete of file as change instead of rename #27869
Comments
there was no change in the fs_event binding logic, so perhaps this was an upstream change in libuv? @nodejs/libuv |
There's been precisely one change to fsevents.c between v10.15.3 and v12.0.0: libuv/libuv@2d2af38 |
@bnoordhuis for those not familiar with the libuv codebase, is that commit responsible for this behaviour change? |
@devsnek I don't know, I haven't had a chance to test. But if it is a libuv issue, it must be that commit. If someone can try reverting that patch in master or v12.x with |
Commit 2d2af38 ("fsevents: really watch files with fsevents on macos 10.7+") from last November introduced a regression where events that were previously reported as UV_RENAME were now reported as UV_CHANGE. This commit rectifies that. Fixes: nodejs/node#27869
libuv/libuv@2d2af38 is indeed responsible for the change in behavior. I'm working on a fix. |
Commit 2d2af38 ("fsevents: really watch files with fsevents on macos 10.7+") from last November introduced a regression where events that were previously reported as UV_RENAME were now reported as UV_CHANGE. This commit rectifies that. Fixes: nodejs/node#27869
Commit 2d2af38 ("fsevents: really watch files with fsevents on macos 10.7+") from last November introduced a regression where events that were previously reported as UV_RENAME were now reported as UV_CHANGE. This commit rectifies that. Fixes: nodejs/node#27869 (cherry picked from commit d649d21)
Commit 2d2af38 ("fsevents: really watch files with fsevents on macos 10.7+") from last November introduced a regression where events that were previously reported as UV_RENAME were now reported as UV_CHANGE. This commit rectifies that. Fixes: nodejs/node#27869
I've bundled the reported issues in #29460. That's the issue to track now. |
12.0.0
Darwin Benjamins-MacBook-Pro.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64
Given the following code:
Running below in a directory where
test.txt
exists and gets deleted yields different results forevent
in12.x
vs10.x
:12.x
:change
10.x
:rename
This basically renders
node.js 12
incapable of detecting a file delete vs change when watching it.The text was updated successfully, but these errors were encountered: