diff --git a/lib/std/fs.zig b/lib/std/fs.zig index 8ae21259ae..573e3b17a8 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -1822,6 +1822,9 @@ pub const Dir = struct { .OBJECT_NAME_NOT_FOUND => return error.FileNotFound, .OBJECT_PATH_NOT_FOUND => return error.FileNotFound, .NOT_A_DIRECTORY => return error.NotDir, + // This can happen if the directory has 'List folder contents' permission set to 'Deny' + // and the directory is trying to be opened for iteration. + .ACCESS_DENIED => return error.AccessDenied, .INVALID_PARAMETER => unreachable, else => return w.unexpectedStatus(rc), }