-
-
Notifications
You must be signed in to change notification settings - Fork 704
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
Watching temp directory on OSX non-recursive does not work #821
Comments
Enabling debug logs, we can actually see that the event is received, but dropped.
Most likely that is due to this piece of code introduced in 2.1.0: https://github.com/gorakhargosh/watchdog/compare/v2.0.3..v2.1.0 watchdog/src/watchdog/observers/fsevents.py Lines 94 to 105 in d691038
|
watchdog/src/watchdog/observers/fsevents.py Lines 107 to 110 in d691038
A potential fix is to convert the |
To test a class that uses watchdog in a unit test, I create files using the
tempfile
module, and then uses it to listen to those changes to that temporary file. However, I encounter that usingrecursive=False
does not work in this case (it does not trigger any events). I presume that this may have something to do with the temporary folder because it works fine in another folder.Encountered this in
watchdog 2.1.3
, but it works withwatchdog 0.10.2
.Steps to reproduce
Running this script on
watchdog 0.10.2
:Now when running the same script under
watchdog 2.1.3
:(Note how there is no even triggered)
If you use
recursive=True
inwatchdog 2.1.3
, it will work as well.After trying a few different versions, it appears to stop working with
2.1.0
and still works in2.0.3
.The text was updated successfully, but these errors were encountered: