* WebConfigurationManager.cs: GetSection properly processes paths of form '~'. Fixes bug #595140. Patch from Adriaan van Kekem <[email protected]>, thanks! svn path=/trunk/mcs/; revision=155140
@@ -1,3 +1,9 @@
+2010-04-09 Marek Habersack <[email protected]>
+
+ * WebConfigurationManager.cs: GetSection properly processes paths
+ of form '~'. Fixes bug #595140. Patch from Adriaan van Kekem
+ <[email protected]>, thanks!
2010-04-08 Gonzalo Paniagua Javier <[email protected]>
* GlobalizationSection.cs: use WebName instead of EncodingName.
@@ -466,7 +466,7 @@ namespace System.Web.Configuration {
if (VirtualPathUtility.IsRooted (path)) {
if (path [0] == '~')
- relPath = path.Substring (2);
+ relPath = path.Length > 1 ? path.Substring (2) : String.Empty;
else if (path [0] == '/')
relPath = path.Substring (1);
else