# posix.renameW: Handle DIRECTORY_NOT_EMPTY more generally · gitcafe/zig

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

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

Visibility: public

Requested revision: 8e155959ca95abbc243e276fa8596964f2fed3b2

Requested commit: 8e155959ca95abbc243e276fa8596964f2fed3b2

Commit: 8e155959ca95abbc243e276fa8596964f2fed3b2

Tree: c61b2f0dda8c011275beed00b1ff0a80589091f6

Author: Ryan Liptak

Committer: Andrew Kelley

## Message

```
posix.renameW: Handle DIRECTORY_NOT_EMPTY more generally

Before this commit, the DIRECTORY_NOT_EMPTY/FILE_IS_A_DIRECTORY/NOT_A_DIRECTORY statuses were assumed only to be possible when using `FILE_RENAME_INFORMATION_EX` and `FILE_RENAME_POSIX_SEMANTICS`, but that has empirically been shown to be false; a networked samba share can return the DIRECTORY_NOT_EMPTY status from `FILE_RENAME_INFORMATION` (which doesn't support `FILE_RENAME_POSIX_SEMANTICS`).

`FILE_IS_A_DIRECTORY` and `NOT_A_DIRECTORY` were not proven to be possible, but they were also moved to the outer switch just in case.

Fixes #19785

```

## Parents

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

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