[Mono-bugs] [Bug 642598] FileSystemWatcher event data differs from Windows

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Sep 29 14:48:14 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=642598

https://bugzilla.novell.com/show_bug.cgi?id=642598#c2


--- Comment #2 from Dennis LaFosse <dennis.lafosse at teradyne.com> 2010-09-29 18:48:14 UTC ---
The bug was found in Mono version 2.6.4 (on CentOS4.3 if that matters).

The code below reproduces the problem. I run the app, create a file in /tmp,
edit, change and save it with emacs. The message printed to the console
displays the full path, not just the filename.

using System;
using System.IO;

namespace FileSystemWatcherTest
{
    class Program
    {
        static void Main(string[] args)
        {
            FileSystemWatcher fsw = new FileSystemWatcher("/tmp");
            fsw.EnableRaisingEvents = true;
            fsw.Changed += new FileSystemEventHandler(fsw_Changed);

            Console.ReadLine();
        }

        static void fsw_Changed(object sender, FileSystemEventArgs e)
        {
            Console.WriteLine("File changed: " + e.Name);
        }
    }
}

-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list