Imported Upstream version 5.0.0.42

Former-commit-id: fd56571888259555122d8a0f58c68838229cea2b
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-04-10 11:41:01 +00:00
parent 1190d13a04
commit 6bdd276d05
19939 changed files with 3099680 additions and 93811 deletions

View File

@ -188,6 +188,8 @@ namespace System.IO
throw new ArgumentException ("Name has invalid chars");
}
path = Path.InsecureGetFullPath (path);
if (Directory.Exists (path)) {
// don't leak the path information for isolated storage
string msg = Locale.GetText ("Access to the path '{0}' is denied.");
@ -211,11 +213,7 @@ namespace System.IO
SecurityManager.EnsureElevatedPermissions (); // this is a no-op outside moonlight
string dname;
if (Path.DirectorySeparatorChar != '/' && path.IndexOf ('/') >= 0)
dname = Path.GetDirectoryName (Path.GetFullPath (path));
else
dname = Path.GetDirectoryName (path);
string dname = Path.GetDirectoryName (path);
if (dname.Length > 0) {
string fp = Path.GetFullPath (dname);
if (!Directory.Exists (fp)) {