diff --git a/mcs/class/corlib/System.IO/Path.cs b/mcs/class/corlib/System.IO/Path.cs index 59cadf1c13ca..6d3b66e893e1 100644 --- a/mcs/class/corlib/System.IO/Path.cs +++ b/mcs/class/corlib/System.IO/Path.cs @@ -355,7 +355,11 @@ internal static string InsecureGetFullPath (string path) } canonicalize = start > 0; - path = Directory.GetCurrentDirectory () + DirectorySeparatorStr + path; + var cwd = Directory.GetCurrentDirectory(); + if (cwd.EndsWith(DirectorySeparatorStr)) + path = cwd + path; + else + path = cwd + DirectorySeparatorChar + path; } else if (DirectorySeparatorChar == '\\' && path.Length >= 2 && IsDsc (path [0]) &&