Переглянути джерело

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!

svn path=/trunk/mcs/; revision=155140
Marek Habersack 15 роки тому
батько
коміт
61163ca5e2

+ 6 - 0
mcs/class/System.Web/System.Web.Configuration_2.0/ChangeLog

@@ -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.

+ 1 - 1
mcs/class/System.Web/System.Web.Configuration_2.0/WebConfigurationManager.cs

@@ -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