Skip to content

Commit c57749f

Browse files
squeek502andrewrk
authored andcommitted
Handle INVALID_DEVICE_REQUEST in std.os.windows.DeviceIoControl
This is possible when e.g. calling CreateSymbolicLink on a FAT32 filesystem
1 parent 4429339 commit c57749f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/std/os/windows.zig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ pub fn DeviceIoControl(
236236
.SUCCESS => {},
237237
.PRIVILEGE_NOT_HELD => return error.AccessDenied,
238238
.ACCESS_DENIED => return error.AccessDenied,
239+
.INVALID_DEVICE_REQUEST => return error.AccessDenied, // Not supported by the underlying filesystem
239240
.INVALID_PARAMETER => unreachable,
240241
else => return unexpectedStatus(rc),
241242
}

0 commit comments

Comments
 (0)