[Mono-dev] Patch Review for HttpApplicationFactory.cs

Robert Jordan robertj at gmx.net
Mon Jan 15 17:14:44 EST 2007


Damien Churchill wrote:
> +                if (File.Exists(Path.Combine(physical_app_path, "Web.config")))
> +                    WatchLocationForRestart("","Web.config");
> +                if (File.Exists(Path.Combine(physical_app_path, "web.config")))
> +                    WatchLocationForRestart("","web.config");
> +                if (File.Exists(Path.Combine(physical_app_path, "Web.Config")))
> +                    WatchLocationForRestart("","Web.Config");

Mono provides a feature that, among other things, enables case
insensitivity of file systems (see MONO_IOMAP on mono's man page).
Therefore you should insert an "else" between the "if" statements.
Even w/out MONO_IOMAP the code might introduce subtle bugs when, for 
example, "Web.config" and "web.config" coexist but are different.

Robert




More information about the Mono-devel-list mailing list