[Mono-devel-list] SearchPattern2.cs

Gonzalo Paniagua Javier gonzalo at ximian.com
Fri Dec 3 03:07:57 EST 2004


On Thu, 2004-12-02 at 15:46 -0500, kangaroo wrote:
> OSX has a (imo) inane file system that is case-aware but 
> case-insensitive; this is causing a problem with my kqueue watcher 
> monitoring global.asax because the code does a File.Exists 
> (Global.asax) first, (for windows compat I assume).

I don't understand why the File.Exists is a problem, but, anyway...

> 
> The simple solution to this problem is a small overload in 
> SearchPattern2.cs, but I'm unsure who the maintainer is of this 
> currently
> 
> ok to commit?
> 
> -kangaroo
> 
> Index: System.IO/SearchPattern.cs
> ===================================================================
> --- System.IO/SearchPattern.cs  (revision 36961)
> +++ System.IO/SearchPattern.cs  (working copy)
> @@ -47,6 +47,14 @@
>                          Compile (pattern);
>                  }
> 
> +               // OSX has a retarded case-insensitive yet case-aware 
> filesystem
> +               // so we need a overload in here for the Kqueue watcher
> +               public bool IsMatch (string text, bool ignore)
> +               {
> +                       this.ignore = ignore;
> +                       return IsMatch (text);
> +               }
> +

I would make it so that IsMatch (string) calls IsMatch (string, bool)
using the ignore field. That way you don't modify case-sensitiveness in
a method called IsMatch...

-Gonzalo




More information about the Mono-devel-list mailing list