Windows: Handle ACCESS_DENIED in DeviceIoControl

This was causing the Dir.readLink test to fail for me locally with error.Unexpected NTSTATUS=0xc0000022. Not sure if PRIVILEGE_NOT_HELD is actually possible or not.
This commit is contained in:
Ryan Liptak 2020-09-29 17:44:28 -07:00 committed by Andrew Kelley
parent 402f967ed5
commit 254ee89def

View File

@ -217,6 +217,7 @@ pub fn DeviceIoControl(
switch (rc) {
.SUCCESS => {},
.PRIVILEGE_NOT_HELD => return error.AccessDenied,
.ACCESS_DENIED => return error.AccessDenied,
.INVALID_PARAMETER => unreachable,
else => return unexpectedStatus(rc),
}