guard / rb-inotify

A thorough inotify wrapper for Ruby using FFI.
MIT License
312 stars 64 forks source link

A couple of fixes #57

Closed paoloaga closed 8 years ago

paoloaga commented 8 years ago

First: event flags :move_self and :delete_self can happen on files also, not only on directories. Fixed documentation.

Second: when a watcher receives the :ignored flag it remains in the notifier.watchers list and can't be closed with watcher.close, because it has already been removed from the inotify native library but it remains inserted into the notifier.watchers hash. This would cause the hash to grow indefinitely and it's not desirable. I added a line of code that removes the hash entry when the :ignored flags is received.

Please review the changes and merge if you think it's valid.

Anyway thanks so far for your useful job.

paoloaga commented 8 years ago

Found a bug in my patch, reworking.