Handle INVALID_DEVICE_REQUEST in std.os.windows.DeviceIoControl

This is possible when e.g. calling CreateSymbolicLink on a FAT32 filesystem
This commit is contained in:
Ryan Liptak 2023-07-23 00:23:51 -07:00 committed by Andrew Kelley
parent 442933936a
commit c57749f5ce

View File

@ -236,6 +236,7 @@ pub fn DeviceIoControl(
.SUCCESS => {},
.PRIVILEGE_NOT_HELD => return error.AccessDenied,
.ACCESS_DENIED => return error.AccessDenied,
.INVALID_DEVICE_REQUEST => return error.AccessDenied, // Not supported by the underlying filesystem
.INVALID_PARAMETER => unreachable,
else => return unexpectedStatus(rc),
}