Skip to content

Commit

Permalink
dotnet#51371 changing maxdirectory for nonwindows
Browse files Browse the repository at this point in the history
  • Loading branch information
mkhamoyan committed Jan 25, 2022
1 parent bdc06e9 commit eddd2ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public void EnumerateFilesOverLegacyMaxPath()
{
// We want to test that directories under the legacy MAX_PATH (260 characters, including the null) can iterate files
// even if the full path is over 260.
var length = OperatingSystem.IsWindows() ? 250 : 1010;
var length = OperatingSystem.IsWindows() ? 250 : 258;
string directory = IOServices.GetPath(GetTestFilePath(), length);
Assert.Equal(length, directory.Length);
Assert.True(Directory.CreateDirectory(directory).Exists);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal static class IOInputs
// Windows specific, this is the maximum length that can be passed to APIs taking directory names, such as Directory.CreateDirectory & Directory.Move.
// Does not include the trailing \0.
// We now do the appropriate wrapping to allow creating longer directories. Like MaxPath, this is a legacy restriction.
public static readonly int MaxDirectory = OperatingSystem.IsWindows() ? 247 : 1016;
public static readonly int MaxDirectory = OperatingSystem.IsWindows() ? 247 : 258;

public const int MaxComponent = 255;

Expand Down

0 comments on commit eddd2ca

Please sign in to comment.