I assume it is intended that the WatchID passed to handleFileAction should match that originally returned by addWatch.
When using the inotify watcher recursively, it creates child inotify watches for each folder.
The WatchID passed to handleFileAction will currently be that of the underlying child inotify watcher that triggers it, and not the ID originally returned by efsw's addWatch (which will be the root directory inotify watcher ID).
This will make the IDs of the child inotify watchers opaque to users of efsw by storing it in a separate member variable, and then maintaining the parent/root ID while creating child watchers.
I assume it is intended that the
WatchID
passed tohandleFileAction
should match that originally returned byaddWatch
.When using the inotify watcher recursively, it creates child inotify watches for each folder. The
WatchID
passed tohandleFileAction
will currently be that of the underlying child inotify watcher that triggers it, and not the ID originally returned by efsw'saddWatch
(which will be the root directory inotify watcher ID).This will make the IDs of the child inotify watchers opaque to users of efsw by storing it in a separate member variable, and then maintaining the parent/root ID while creating child watchers.