http://bugs.winehq.org/show_bug.cgi?id=7216
--- Comment #19 from Alexandre Julliard julliard@winehq.org 2008-07-20 13:21:22 --- (In reply to comment #18)
Created an attachment (id=14940)
--> (http://bugs.winehq.org/attachment.cgi?id=14940) [details]
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.
Yes, directories are only added as the app opens them. We can't do a recursive add automatically, that's way too expensive, especially in the server.