aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os
diff options
context:
space:
mode:
authorRyan Liptak <squeek502@hotmail.com>2020-09-29 17:44:28 -0700
committerAndrew Kelley <andrew@ziglang.org>2020-09-29 20:54:45 -0400
commit254ee89def29f67fdf4dd4c6a433ae876f76d79e (patch)
tree125de3cb3b9a9d60ba7ac985cfb789cf4de4f16a /lib/std/os
parent402f967ed5339fa3d828b7fe1d57cdb5bf38dbf2 (diff)
downloadzig-254ee89def29f67fdf4dd4c6a433ae876f76d79e.tar.gz
zig-254ee89def29f67fdf4dd4c6a433ae876f76d79e.zip
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 (limited to 'lib/std/os')
-rw-r--r--lib/std/os/windows.zig1
1 files changed, 1 insertions, 0 deletions
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),
}