http://bugzilla.novell.com/show_bug.cgi?id=322330
User [email protected] added comment http://bugzilla.novell.com/show_bug.cgi?id=322330#c25 --- Comment #25 from Alexander Kojevnikov <[email protected]> 2009-09-19 01:16:58 MDT --- Created an attachment (id=318940) --> (http://bugzilla.novell.com/attachment.cgi?id=318940) Proposed patch This patch fixes the issues reported by the OP and in my previous comment. In particular: * Hunks 1 and 4 remove the new_name_needed flag, it's not used anywhere and only adds confusion. * Hunk 2 skips DeleteSelf event for sub-directories, they receive the Delete event anyway. * Hunk 3 makes sure that we use a combination of Deleted+Created notifications instead of a single Renamed notification, if the watched item has been moved from one directory to another. This is because RenamedEventArgs supports only one directory name: FullPath is always directory+name, OldFullPath is always directory+old_name. * Hunk 5 updates relevant InotifyData instances with the new directory name. Without this, notifications always use the original folder names. The last hunk may be a bit slow as it needs to iterate on all the InotifyData instances. On the other hand, we are already doing it on the Delete event (lines 560:568) and by default inotify allows only 8192 watches per user. On a side note, are there any regression tests for FileSystemWatcher, and if there are, how to run them? -- Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
