Changed reduce to keep consecutive slashes.
authorMarcos Henrich <marcos.henrich@xamarin.com>
Tue, 8 Jul 2014 09:24:31 +0000 (10:24 +0100)
committerMarcos Henrich <marcos.henrich@xamarin.com>
Tue, 8 Jul 2014 09:24:31 +0000 (10:24 +0100)
mcs/class/System/System/UriHelper.cs

index fc3641a1dc89a8c7514efd98cb14626e12c430d4..34110bc03f80636293b85fd20b83c207b73a9e9e 100644 (file)
@@ -439,14 +439,12 @@ namespace System {
                                        continue;
                                }
 
-                               if (trimDots)
+                               if (current == "." ||
+                                       (trimDots && current.EndsWith("."))) {
                                        current = current.TrimEnd('.');
-
-                               if (current == ".")
-                                       current = "";
-
-                               if (current == "" && startpos < path.Length)
-                                       continue;
+                                       if (current == "" && endpos < path.Length)
+                                               continue;
+                               }
 
                                result.Add (current);
                        }