diff --git a/mcs/class/System.Web/System.Web/ChangeLog b/mcs/class/System.Web/System.Web/ChangeLog index 0c4832fe91855..f53ae1c4e2541 100644 --- a/mcs/class/System.Web/System.Web/ChangeLog +++ b/mcs/class/System.Web/System.Web/ChangeLog @@ -1,3 +1,8 @@ +2009-06-04 Marek Habersack + + * HttpApplicationFactory.cs: OnFileChanged ignores the directory + part of the file triggering the event. Fixes bug #509998 + 2009-06-03 Marek Habersack * VirtualPathUtility.cs: IsValidVirtualPath now checks the value diff --git a/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs b/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs index 6408a9455f503..bb8802439d726 100644 --- a/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs +++ b/mcs/class/System.Web/System.Web/HttpApplicationFactory.cs @@ -717,10 +717,10 @@ static void OnFileRenamed(object sender, RenamedEventArgs args) static void OnFileChanged(object sender, FileSystemEventArgs args) { string name = args.Name; - - if (StrUtils.EndsWith (name, "onfig", true) && String.Compare (name, "web.config", true) != 0) - return; - if (StrUtils.EndsWith (name, "lobal.asax", true) && String.Compare (name, "global.asax", true) != 0) + if (StrUtils.EndsWith (name, "onfig", true)) { + if (String.Compare (Path.GetFileName (name), "web.config", true) != 0) + return; + } else if (StrUtils.EndsWith (name, "lobal.asax", true) && String.Compare (name, "global.asax", true) != 0) return; // {Inotify,FAM}Watcher will notify about events for a directory regardless diff --git a/mcs/class/System/System.IO/ChangeLog b/mcs/class/System/System.IO/ChangeLog index efca2b10dadc5..e42bbdf55e8b8 100644 --- a/mcs/class/System/System.IO/ChangeLog +++ b/mcs/class/System/System.IO/ChangeLog @@ -1,3 +1,9 @@ +2009-06-04 Marek Habersack + + * InotifyWatcher.cs: filter pattern should be matched on file name + alone, not on the relative path of the file triggering the + event. Fixes bug #509998 + 2009-03-11 Gonzalo Paniagua Javier * InotifyWatcher.cs: don't send events when a directory is created diff --git a/mcs/class/System/System.IO/InotifyWatcher.cs b/mcs/class/System/System.IO/InotifyWatcher.cs index e636da2b30ec0..f58cc43e52297 100644 --- a/mcs/class/System/System.IO/InotifyWatcher.cs +++ b/mcs/class/System/System.IO/InotifyWatcher.cs @@ -547,7 +547,7 @@ void ProcessEvents (byte [] buffer, int length) } } - if (filename != data.Directory && !fsw.Pattern.IsMatch (filename)) { + if (filename != data.Directory && !fsw.Pattern.IsMatch (Path.GetFileName (filename))) { continue; }