-
-
Notifications
You must be signed in to change notification settings - Fork 564
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
Incorrect event firing on macOS when filename case changes #1280
Comments
This kind of issue usually happens in directories, exactly as you mentioned. In your case, since we talking about files, it appears to be a design choice rather than a problem with the SO. In the event 'all', seems that it only triggers for event 'change' and event 'add'. I think this could actually be considered a feature implementation request. Having spent some time familiarizing myself with the codebase, I want to contribute and would like to offer my help in this issue. |
On a case-insensitive (i.e. typical) APFS drive, when a filename changes case, incorrect events fire.
If a filename starts off as "scratch.txt", when it is changed to "Scratch.txt" the following events fire:
However, I would expect to see:
If the file is then changed from "Scratch.txt" to "SCratch.txt", the following events fire:
That is consistent with the events that fired when going from "scratch.txt" to "Scratch.txt".
However, if the filename later changes from "SCRatch.txt" back to "scratch.txt" (e.g. a prior casing), then the following events fire:
Notice that this change is not consistent with the prior changes: it's two
change
events, not achange
followed by anadd
.Versions (please complete the following information):
To Reproduce:
See above.
I used the following simple index.js code:
And I started with a file named "scratch.txt".
Expected behavior
See above.
Additional context
I expect that this problem occurs because typical macOS drives are case insensitive.
The text was updated successfully, but these errors were encountered: