[Mono-bugs] [Bug 574564] New: FileSystemWatcher.NotifyFilters don't allow you to filter between directory or file events

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Jan 27 18:16:24 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=574564

http://bugzilla.novell.com/show_bug.cgi?id=574564#c0


           Summary: FileSystemWatcher.NotifyFilters don't allow you to
                    filter between directory or file events
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.6.x
          Platform: All
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: System
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: anthony.taranto at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=339265)
 --> (http://bugzilla.novell.com/attachment.cgi?id=339265)
test case, works on .NET, fails on mono

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US)
AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0

I'm creating two FileSystemWatchers that are watching the same path. They have
the following sets of NotifyFilters:
1: NotifyFilters.FileName | NotifyFilters.LastWrite;
2: NotifyFilters.DirectoryName | NotifyFilters.LastWrite;

On .NET, watcher 1 fires events for directory creation/deletion and watcher 2
fires events for file creation/deletion.

On mono however, both watchers will fire events if a file _or_ folder is
created/deleted.

The NotifyFilters.FileName and NotifyFilters.DirectoryName seem to have no
effect.

Reproducible: Always

Steps to Reproduce:
Run attached test case, which creates two watchers both watching your Desktop
directory. Notice that on .NET the NotifyFilters are honored. On mono however,
both watchers will fire events regardless of a file/directory being created or
deleted.

-- 
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.


More information about the mono-bugs mailing list