diff --git a/lib/Windows/NativeMethods.cs b/lib/Windows/NativeMethods.cs index 50d2767..4c3bf87 100644 --- a/lib/Windows/NativeMethods.cs +++ b/lib/Windows/NativeMethods.cs @@ -158,6 +158,7 @@ public enum FileSystemFeature : uint public const int ERROR_INVALID_HANDLE = 6; public const int ERROR_NO_MORE_FILES = 18; public const int ERROR_MORE_DATA = 234; + public const int ERROR_NO_SUCH_DEVICE = 433; // ReFS specific WinError codes. public const int ERROR_BLOCK_TOO_MANY_REFERENCES = 347; diff --git a/lib/Windows/VolumeEnumerator.cs b/lib/Windows/VolumeEnumerator.cs index 36fc7a5..3c7bb83 100644 --- a/lib/Windows/VolumeEnumerator.cs +++ b/lib/Windows/VolumeEnumerator.cs @@ -143,7 +143,8 @@ private static IReadOnlyList GetVolumePathNamesForVolumeName( if (!success) { int lastErr = Marshal.GetLastWin32Error(); - if (lastErr == NativeMethods.ERROR_FILE_NOT_FOUND) + if (lastErr == NativeMethods.ERROR_FILE_NOT_FOUND || + lastErr == NativeMethods.ERROR_NO_SUCH_DEVICE) { // No mount points for this volume. return Array.Empty();