Fix unexpected exception when enumerating a completely empty drive root (#33684)
authorCarlos Sanchez Lopez <1175054+carlossanlop@users.noreply.github.com>
Wed, 18 Mar 2020 21:09:31 +0000 (14:09 -0700)
committerGitHub <noreply@github.com>
Wed, 18 Mar 2020 21:09:31 +0000 (14:09 -0700)
commit650acb57adfe8bf8791782c183ab06de3938d8a4
tree4926efe34d6f7cb3397b50ef4b16a119e7fb05b1
parent67d1cb6362a0f55eb66c3115add8eacd92ff1114
Fix unexpected exception when enumerating a completely empty drive root (#33684)

* Fix unexpected exception when enumerating a completely empty drive root.

* Address PR suggestions:
- Add NTStatus for file not found.
- Use it in the switch case. Since it's a rare case, add it right above 'default'.

* Remove hidden character causing build failure. It showed up after the file's encoding was changed to UTF8.
src/libraries/Common/src/Interop/Windows/NtDll/Interop.NtStatus.cs
src/libraries/System.IO.FileSystem/src/System/IO/Enumeration/FileSystemEnumerator.Win32.cs