# windows: Handle \`DELETE_PENDING\` in \`DeleteFile\`\. · gitcafe/zig

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

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

Visibility: public

Requested revision: 8c79559748b9828d2ad6a5bff89db4da0283d6b2

Requested commit: 8c79559748b9828d2ad6a5bff89db4da0283d6b2

Commit: 8c79559748b9828d2ad6a5bff89db4da0283d6b2

Tree: c5b835f843f6c4ebd003d52ab2abbe7a241ae4c0

Author: xEgoist

Committer: xEgoist

## Message

```
windows: Handle `DELETE_PENDING` in `DeleteFile`.

DELETE_PENDING can happen when the file is yet to be closed for deletion
or if it never get closed. In that case, DeleteFile should assume the
file deletion is succeeding (no CloseHandle is required as it's a "failure"). In case of `DELETE_PENDING` failure, the file
may still exist. In which case if it's part of `deleteTree`, it will
eventually fail on `error.DirNotEmpty`.

```

## Parents

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

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