From: Sebastien Pouliot Date: Thu, 26 Nov 2015 16:34:41 +0000 (-0500) Subject: [mscorlib] Do not include a win32-p/invoke call (GetFullPathName) for the mobile... X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=5bd701308efc18327ead90e658fd137caf3dea47;p=mono.git [mscorlib] Do not include a win32-p/invoke call (GetFullPathName) for the mobile profile --- diff --git a/mcs/class/corlib/System.IO/Path.cs b/mcs/class/corlib/System.IO/Path.cs index 7945d407406..9ac0e975454 100644 --- a/mcs/class/corlib/System.IO/Path.cs +++ b/mcs/class/corlib/System.IO/Path.cs @@ -289,6 +289,7 @@ namespace System.IO { return fullpath; } +#if !MOBILE // http://msdn.microsoft.com/en-us/library/windows/desktop/aa364963%28v=vs.85%29.aspx [DllImport("Kernel32.dll", SetLastError = true, CharSet = CharSet.Unicode)] private static extern int GetFullPathName(string path, int numBufferChars, StringBuilder buffer, ref IntPtr lpFilePartOrNull); @@ -341,6 +342,7 @@ namespace System.IO { } return path; } +#endif // insecure - do not call directly internal static string InsecureGetFullPath (string path) @@ -352,11 +354,11 @@ namespace System.IO { string msg = Locale.GetText ("The specified path is not of a legal form (empty)."); throw new ArgumentException (msg); } - +#if !MOBILE // adjust for drives, i.e. a special case for windows if (Environment.IsRunningOnWindows) path = WindowsDriveAdjustment (path); - +#endif // if the supplied path ends with a separator... char end = path [path.Length - 1];