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

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

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

Visibility: public

Requested revision: 71668fc4e3c7963d3cd434888deea4700a5ab27c

Requested commit: 71668fc4e3c7963d3cd434888deea4700a5ab27c

Commit: 71668fc4e3c7963d3cd434888deea4700a5ab27c

Tree: 3fc32a1befbf405d058a1872fb1940ebd2ade717

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

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

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