http://bugs.winehq.org/show_bug.cgi?id=7216
--- Comment #18 from Dan Kegel dank@kegel.com 2008-07-20 11:24:47 --- Created an attachment (id=14940) --> (http://bugs.winehq.org/attachment.cgi?id=14940) 2nd version of demo program showing how wine cheats
This is a guess, but: Wine's implementation of change notification seems to have taken a gamble. If you insert a dir /s after calling ReadDirectoryChanges the first time, it works. Why? Because server/change.c probably bets that the app would do a recursive scan of the watched directories after issuing the first ReadDirectoryChanges, and piggybacks on that scan to do all the needed inotify_add_watches.
The fix is probably for Wine to do its own darned recursive scan, hang the overhead. Alternately, affected apps (like Picasa) could make sure they start their recursive scans *after* calling ReadDirectoryChanges.