-
Notifications
You must be signed in to change notification settings - Fork 248
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
Not stable against Dir.chdir; how to work around? #21
Comments
A simple fix for your problem would be to pass |
Could you try the fix and see it it helps with your case? |
Now no change events seem to get through. |
I just pushed a fix for the problem caused by the the previous one. Everything inside Listen now will be working with absolute paths to avoid the problems caused by changing the |
Thanks! It works as expected in the simple case from above; when I edit files in the ignored subdirectory, those events are filtered. However, when I modify a deeper file, say Also, when I navigate into the ignored subdirectory's subdirectories with Nautilus, |
Changes inside directories which are inside an ignored path does get reported, which should not happen! I'll investigate this and respond to you shortly. Thanks for reporting this weird bug :) |
Consider this code:
Apparently,
listen
works with relative paths internally, which causes a) remove events for all files in the main directory after thechdir
and b) events inside ofsub
to be reported afterchdir
(despite theignore
).Using
chdir
with blocks, i.e.does not help.
I suggest that
listen
should use total paths internally to be stable against this. If there are hard reasons against that, how can one circumvent the issue (short of not usingchdir
)?The text was updated successfully, but these errors were encountered: