SpartanJ / efsw

efsw is a C++ cross-platform file system watcher and notifier.
Other
662 stars 101 forks source link

Items in subdirectories of watched directories on Linux return events under a different watch ID #140

Closed jg-x2x closed 2 years ago

jg-x2x commented 2 years ago

If you have a directory structure like this:

dir - fileA
   \- subdir - fileB

and you add a watch for dir, it gets watchID 1. Actions that happen to fileA or subdir itself are raised for watchID 1 as expected. Events that happen to fileB are raised for watchID 2 and are thus missed by client code looking for events related to the ID it was given. Considering this doesn't happen on any platform other than Linux, I presume it to be a bug?

Tested on CentOS 7 and CentOS 9

SpartanJ commented 2 years ago

Hi! Yes, this is accidental. PR #139 will solve this issue.

jg-x2x commented 2 years ago

Good to hear. Thanks for confirming.

SpartanJ commented 2 years ago

Fixed.