diff --git a/inotify/adapters.py b/inotify/adapters.py index 8a67347..cb4b65d 100644 --- a/inotify/adapters.py +++ b/inotify/adapters.py @@ -123,7 +123,7 @@ def remove_watch_with_id(self, wd, superficial=False): if superficial is False: _LOGGER.debug("Removing watch for watch-handle (%d).", wd) - inotify.calls.inotify_rm_watch(self.__inotify_fd, wd) + # inotify.calls.inotify_rm_watch(self.__inotify_fd, wd) def _get_event_names(self, event_type): names = [] @@ -299,7 +299,7 @@ def event_gen(self, ignore_missing_new_folders=False, **kwargs): self._i.add_watch(full_path, self._mask) - if header.mask & inotify.constants.IN_MOVED_FROM: + if header.mask & inotify.constants.IN_DELETE: _LOGGER.debug("A directory has been removed. We're " "being recursive, but it would have " "automatically been deregistered: [%s]",