Removed Consoles and ^Ms
[mono.git] / mcs / class / System / System.Net / WebClient.cs
index 2c1aa523bde7c3f219a5022d4e516861cd537b8c..ca424855e3ffefb5c669487e150c12b6e65d8bd1 100644 (file)
@@ -295,12 +295,12 @@ namespace System.Net
                                try {\r
                                        return new Uri (path);\r
                                }\r
-                               catch (System.UriFormatException ufe) {\r
-                                       if (path[0] == '/') {\r
+                               catch (System.UriFormatException) {\r
+                                       if ((path[0] == Path.DirectorySeparatorChar) || (path[1] == ':' && Char.ToLower(path[0]) > 'a' && Char.ToLower(path[0]) < 'z')) {\r
                                                return new Uri ("file://" + path);\r
                                        }\r
                                        else {\r
-                                               return new Uri ("file://" + Environment.CurrentDirectory + "/" + path);\r
+                                               return new Uri ("file://" + Environment.CurrentDirectory + Path.DirectorySeparatorChar + path);\r
                                        }\r
                                }\r
                        }\r