try {\r
return new Uri (path);\r
}\r
- catch (System.UriFormatException ufe) {\r
- return new Uri ("file://" + path);\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.DirectorySeparatorChar + path);\r
+ }\r
}\r
}\r
\r