Open AiRyunn opened 4 years ago
I'm having the same problem.
It seems this issue is caused by the module not listening to IN_DELETE_SELF events. In theory it would work to just register yourself for that event and call remove_watch on the Inotify object, however since the superficial parameter is not passed on from remove_watch to remove_watch_with_id this would result in an invalid system call. Since this is the last statement in that function calling remove_watch and catching that exception works as a workaround for me....
This is already fixed in the master branch but not the current pip package.
pip install git+https://github.com/dsoprea/PyInotify
I'm using InotifyTree, but when I recreate a directory, it outputs "Path already being watched: /my/folder", and ignore all events about this folder.