Skip to content
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

remove_watch functionality #59

Open
Elias481 opened this issue Aug 26, 2018 · 0 comments
Open

remove_watch functionality #59

Elias481 opened this issue Aug 26, 2018 · 0 comments

Comments

@Elias481
Copy link

Few points regarding remove_watch functionality.

  1. remove_watch should propagate superficial argument to remove_watch_with_id (but I see Propagate superficial parameter to remove_watch_with_id #57 is already in place for that)
  1. I would like a public method to remove a wd only from underlying inotify (inotify.calls.inotify_rm_watch) to have possibility to remove the watch from one thread and watching thread is propagating the change which is does not using public remove_watch as it suppress the event if diretory name cannot be looked up) - possibly just a parameter (why not reuse superficial so True = only tracking information, False = tracking information + watch, None = watch only...)
  2. method remove_watch_with_id should not be public (without _) in current form as the self.__watches is not cleanup up using this method and there is no public method to only cleanup that - but best to make both existing methods removing both forward and reverse lookup entries for wd (and if superficial is False also remove the wd from underlying inotify)
  3. think about handling IN_IGNORE events received (in this case the the wd was unregistered automatically by underlying inotify) - so IN_IGNORE could cause automatic remove_watch with superficial set to True (sure that could be left up to the user. but at least there should be working methods for this case, currently is neighter - one does not support superficial the other does not remove forward entry from map..) - anyway if this would be implemented this could break the

Btw. in _BaseTree event_gen is another bug... The IN_MOVED_TO is handled twice so it will log a warning in that case...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant