Fixing build break in K caused by the long file path work.
[tfs-changeset: 1606374]
}
}
+ [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:
#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
// "\\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);
// 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;
}
}
+#endif // FEATURE_PATHCOMPAT
\ No newline at end of file
/// 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())