commit 254ee89def29f67fdf4dd4c6a433ae876f76d79e (tree)
parent 402f967ed5339fa3d828b7fe1d57cdb5bf38dbf2
Author: Ryan Liptak <squeek502@hotmail.com>
Date: Tue, 29 Sep 2020 17:44:28 -0700
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.
Diffstat:
1 file changed, 1 insertion(+), 0 deletions(-)
diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig
@@ -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),
}