summaryrefslogtreecommitdiff
path: root/src/mscorlib
diff options
context:
space:
mode:
authorJan Kotas <jkotas@microsoft.com>2016-05-19 16:08:39 -0700
committerJan Kotas <jkotas@microsoft.com>2016-05-19 16:08:39 -0700
commit1205aa01a485a49c4856e1637b1f7e87d12cd30a (patch)
tree38851fcb77b2a2e9088c934574c29931f2460068 /src/mscorlib
parentfffe097e4a0b21b618543078a8fa19aec3d55856 (diff)
parent9acb5d6f68f7e0590e8be2542efdc8cc241dcec0 (diff)
downloadcoreclr-1205aa01a485a49c4856e1637b1f7e87d12cd30a.tar.gz
coreclr-1205aa01a485a49c4856e1637b1f7e87d12cd30a.tar.bz2
coreclr-1205aa01a485a49c4856e1637b1f7e87d12cd30a.zip
Merge pull request #5106 from dotnet-bot/from-tfs
Merge changes from TFS
Diffstat (limited to 'src/mscorlib')
-rw-r--r--src/mscorlib/src/System/IO/LongPathHelper.cs1
-rw-r--r--src/mscorlib/src/System/IO/Path.cs9
-rw-r--r--src/mscorlib/src/System/IO/PathHelper.cs3
-rw-r--r--src/mscorlib/src/System/Security/Permissions/FileIOPermission.cs2
4 files changed, 12 insertions, 3 deletions
diff --git a/src/mscorlib/src/System/IO/LongPathHelper.cs b/src/mscorlib/src/System/IO/LongPathHelper.cs
index 41cbb15847..9f99d80f55 100644
--- a/src/mscorlib/src/System/IO/LongPathHelper.cs
+++ b/src/mscorlib/src/System/IO/LongPathHelper.cs
@@ -377,6 +377,7 @@ namespace System.IO
}
}
+ [System.Security.SecuritySafeCritical]
private static string TryExpandShortFileName(StringBuffer outputBuffer, string originalPath)
{
// We'll have one of a few cases by now (the normalized path will have already:
diff --git a/src/mscorlib/src/System/IO/Path.cs b/src/mscorlib/src/System/IO/Path.cs
index 10da27ccd4..a54e559486 100644
--- a/src/mscorlib/src/System/IO/Path.cs
+++ b/src/mscorlib/src/System/IO/Path.cs
@@ -104,12 +104,11 @@ namespace System.IO {
#endif // !PLATFORM_UNIX
- // Make this public sometime.
// The max total path is 260, and the max individual component length is 255.
// For example, D:\<256 char file name> isn't legal, even though it's under 260 chars.
internal static readonly int MaxPath = PathInternal.MaxShortPath;
- private static readonly int MaxDirectoryLength = 255;
+ private static readonly int MaxDirectoryLength = PathInternal.MaxComponentLength;
// Windows API definitions
internal const int MAX_PATH = 260; // From WinDef.h
@@ -159,6 +158,12 @@ namespace System.IO {
// "\\server\share").
public static String GetDirectoryName(String path)
{
+ return GetDirectoryNameInternal(path);
+ }
+
+ [System.Security.SecuritySafeCritical]
+ private static string GetDirectoryNameInternal(string path)
+ {
if (path != null)
{
CheckInvalidPathChars(path);
diff --git a/src/mscorlib/src/System/IO/PathHelper.cs b/src/mscorlib/src/System/IO/PathHelper.cs
index 0a57f6a44e..8e39b3c537 100644
--- a/src/mscorlib/src/System/IO/PathHelper.cs
+++ b/src/mscorlib/src/System/IO/PathHelper.cs
@@ -1,6 +1,8 @@
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
+
+#if FEATURE_PATHCOMPAT
using System;
using System.Collections;
using System.Text;
@@ -443,3 +445,4 @@ namespace System.IO {
}
}
+#endif // FEATURE_PATHCOMPAT \ No newline at end of file
diff --git a/src/mscorlib/src/System/Security/Permissions/FileIOPermission.cs b/src/mscorlib/src/System/Security/Permissions/FileIOPermission.cs
index e43c49c9ca..a28f54ff5e 100644
--- a/src/mscorlib/src/System/Security/Permissions/FileIOPermission.cs
+++ b/src/mscorlib/src/System/Security/Permissions/FileIOPermission.cs
@@ -993,7 +993,7 @@ namespace System.Security.Permissions {
/// IMPORTANT: This method should only be used after calling GetFullPath on the path to verify
/// </summary>
[System.Security.SecuritySafeCritical]
- internal static void QuickDemand(FileIOPermissionAccess access, string fullPath, bool checkForDuplicates, bool needFullPath)
+ internal static void QuickDemand(FileIOPermissionAccess access, string fullPath, bool checkForDuplicates = false, bool needFullPath = false)
{
#if FEATURE_CAS_POLICY
if (!CodeAccessSecurityEngine.QuickCheckForAllDemands())