Skip to content

Commit 96d72db

Browse files
authored
Partially disable test (#59760)
1 parent a8da511 commit 96d72db

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/libraries/System.IO.FileSystem/tests/Enumeration/SpecialDirectoryTests.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,14 @@ public void SkippingHiddenFiles()
6060
{
6161
// Files that begin with periods are considered hidden on Unix
6262
string[] paths = GetNames(TestDirectory, new EnumerationOptions { ReturnSpecialDirectories = true, AttributesToSkip = 0 });
63-
Assert.Contains(".", paths);
63+
64+
if (!PlatformDetection.IsWindows10Version22000OrGreater)
65+
{
66+
// Sometimes this is not returned - presumably an OS bug.
67+
// This occurs often on Windows 11, very rarely otherwise.
68+
Assert.Contains(".", paths);
69+
}
70+
6471
Assert.Contains("..", paths);
6572
}
6673
}

0 commit comments

Comments
 (0)