# windows.OpenFile/DeleteFile: Add NetworkNotFound as a possible error · gitcafe/zig

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

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

Visibility: public

Requested revision: 9a3adeea6ef0eb30e75e732148e0a2b93d0d0c99

Requested commit: 9a3adeea6ef0eb30e75e732148e0a2b93d0d0c99

Commit: 9a3adeea6ef0eb30e75e732148e0a2b93d0d0c99

Tree: 0b4c647651ff5e8881d29ec60242e4ba35340e4c

Author: Ryan Liptak

Committer: Andrew Kelley

## Message

```
windows.OpenFile/DeleteFile: Add NetworkNotFound as a possible error

When calling NtCreateFile with a UNC path, if either `\\server` or `\\server\share` are not found, then the statuses `BAD_NETWORK_PATH` or `BAD_NETWORK_NAME` are returned (respectively).

These statuses are not translated into `error.FileNotFound` because they convey more information than the typical FileNotFound error. For example, if you were trying to call `Dir.makePath` with an absolute UNC path like `\\MyServer\MyShare\a\b\c\d`, then knowing that `\\MyServer\MyShare` was not found allows for returning after trying to create the first directory instead of then trying to create `a\b\c`, `a\b`, etc. when it's already known that they will all fail in the same way.

```

## Parents

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

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