From 254ee89def29f67fdf4dd4c6a433ae876f76d79e Mon Sep 17 00:00:00 2001 From: Ryan Liptak Date: Tue, 29 Sep 2020 17:44:28 -0700 Subject: [PATCH] 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. --- lib/std/os/windows.zig | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/std/os/windows.zig b/lib/std/os/windows.zig index de0d0ea45f..a308ee76fc 100644 --- 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), }