diff --git a/lib/std/fs.zig b/lib/std/fs.zig index d2df596b3e..c76d10ca4e 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -1794,6 +1794,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), }