# windows: use NtSetInformationFile in DeleteFile\. · gitcafe/zig

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

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

Visibility: public

Requested revision: 911f74e93b15024c7a2a15ca6845bd0ddbdf9b3c

Requested commit: 911f74e93b15024c7a2a15ca6845bd0ddbdf9b3c

Commit: 911f74e93b15024c7a2a15ca6845bd0ddbdf9b3c

Tree: 6496bc16c1f1ce236465e438f1f978acd4976c3d

Author: xEgoist

Committer: xEgoist

## Message

```
windows: use NtSetInformationFile in DeleteFile.

Using `FILE_DELETE_ON_CLOSE` can silently succeed without reporting any error
on non-empty directory. This commit adds usage of NtSetInformationFile
which will report `DIRECTORY_NOT_EMPTY`.

```

## Parents

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

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