howeyc/fsnotify — pull request #11 by snoe (2012-07-03 21:23:51+00:00)
Title: Added a test case that shows a couple issues with watching dirs on bsd

I've only tested this on OSX (leopard).

If you are watching a directory and a file is moved to a backup dir and replaced with a new version of the file, fsnotify works in two unexpected ways:

1. The moved file that is no longer in the watched dir is still emitting events.
2. The new file replacement never emits events.

I ran into this problem using vim to edit files in a directory that was being watched. The same issue is present if you watch a particular file.

I believe the test case I added exposes both of these issues. Unfortunately I don't have the expertise or time to delve into the details and figure out why this is happening or if it's happening on other platforms.