I notice that PollingWatchService never checks the file key when it reads a 
directory to see if it is reading from the same directory that it started with.

I suspect that creates a potential for incorrect behavior if the directory tree 
is rearranged (between polls) so that the original path accesses a different 
directory.

Specifically, if the original directory remains available via some other path, 
then someone watching on that path or trying to register using that path will 
be using a watch service that is reading the wrong directory.

Reply via email to