# Dir.openDirAccessMaskW: Add ACCESS_DENIED as a possible error · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/fe6fd0d5412bdef86cf200d664b37e05a3050966)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: fe6fd0d5412bdef86cf200d664b37e05a3050966

Requested commit: fe6fd0d5412bdef86cf200d664b37e05a3050966

Commit: fe6fd0d5412bdef86cf200d664b37e05a3050966

Tree: 7b42068b5a5ff8d93e949cca2dbfc535cefbe4ee

Author: Ryan Liptak

Committer: Andrew Kelley

## Message

```
Dir.openDirAccessMaskW: Add ACCESS_DENIED as a possible error

Can occur when trying to open a directory for iteration but the 'List folder contents' permission of the directory is set to 'Deny'.

This was found because it was being triggered during PATH searching in ChildProcess.spawnWindows if a PATH entry did not have 'List folder contents' permission, so this fixes that as well (note: the behavior on hitting this during PATH searching is to treat it as the directory not existing and therefore will fail to find any executables in a directory in the PATH without 'List folder contents' permission; this matches Windows behavior which also fails to find commands in directories that do not have 'List folder contents' permission).

```

## Parents

- [433709a78864cf65e1686d3178a05605e4c61c66](https://git.cafe/gitcafe/zig/commit/433709a78864cf65e1686d3178a05605e4c61c66?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/fe6fd0d5412bdef86cf200d664b37e05a3050966?format=markdown)
