Try this: new DirectoryInfo(@"C:\").GetDirectories().Count three times in a row. The first two times it's correct; the third time it's one fewer than it should be.
The reason for this appears to be the addition of an ERROR_NO_MORE_FILES check on this branch. Sometimes FindFirstFileEx sets this when enumerating the root drive. Hopefully not just on my system.
Try this:
new DirectoryInfo(@"C:\").GetDirectories().Count
three times in a row. The first two times it's correct; the third time it's one fewer than it should be.The reason for this appears to be the addition of an
ERROR_NO_MORE_FILES
check on this branch. Sometimes FindFirstFileEx sets this when enumerating the root drive. Hopefully not just on my system.