projects
/
mono.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c005ca7
)
Move check for slash inside of existing short path check and do a char comparison...
author
Jonathan Chambers
<joncham@gmail.com>
Thu, 14 Jul 2016 13:40:27 +0000
(09:40 -0400)
committer
Jonathan Chambers
<joncham@gmail.com>
Thu, 14 Jul 2016 13:47:42 +0000
(09:47 -0400)
mcs/class/corlib/System.IO/Path.cs
patch
|
blob
|
history
diff --git
a/mcs/class/corlib/System.IO/Path.cs
b/mcs/class/corlib/System.IO/Path.cs
index 0b2704c1202c9246308dc56342c5c56edaa44f60..d0512f24695a2a5dbe3111080092742268f8da45 100644
(file)
--- a/
mcs/class/corlib/System.IO/Path.cs
+++ b/
mcs/class/corlib/System.IO/Path.cs
@@
-321,10
+321,11
@@
namespace System.IO {
internal static string WindowsDriveAdjustment (string path)
{
// three special cases to consider when a drive is specified
- if (path
== @"\" || path == "/")
- return Path.GetPathRoot(Directory.GetCurrentDirectory());
- if (path.Length < 2)
+ if (path
.Length < 2) {
+ if (path.Length == 1 && (path[0] == '\\' || path[0] == '/'))
+ return Path.GetPathRoot(Directory.GetCurrentDirectory());
return path;
+ }
if ((path [1] != ':') || !Char.IsLetter (path [0]))
return path;