* WebConfigurationManager.cs: improve performance of
FindWebConfig.
svn path=/trunk/mcs/; revision=122730
+2009-01-08 Marek Habersack <mhabersack@novell.com>
+
+ * WebConfigurationManager.cs: improve performance of
+ FindWebConfig.
+
2009-01-07 Marek Habersack <mhabersack@novell.com>
* HttpModulesSection.cs: allow for modules with non-public
static string FindWebConfig (string path)
{
- string curPath = configPaths [path] as string;
+ if (String.IsNullOrEmpty (path))
+ return path;
+
+ string dir;
+ if (path [path.Length - 1] == '/')
+ dir = path;
+ else {
+ dir = VirtualPathUtility.GetDirectory (path);
+ if (dir == null)
+ return path;
+ }
+
+ string curPath = configPaths [dir] as string;
if (curPath != null)
return curPath;
}
}
- configPaths [path] = curPath;
+ configPaths [dir] = curPath;
return curPath;
}