# fs: Add tests for deleteTree not following symlinks · gitcafe/zig

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

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

Visibility: public

Requested revision: 70b248497ab87471997c62a515bf4bb4109899b9

Requested commit: 70b248497ab87471997c62a515bf4bb4109899b9

Commit: 70b248497ab87471997c62a515bf4bb4109899b9

Tree: 43cebd226cfe9cfdec7134c69d0c388a1369a533

Author: Ryan Liptak

Committer: Veikka Tuominen

## Message

```
fs: Add tests for deleteTree not following symlinks

In theory this is part of https://github.com/ziglang/zig/issues/18335, but these tests already pass since deleteTree does not depend on `OpenDirOptions.no_follow` behavior for these test cases:

- `deleteTree` always tries to delete the initial path as a file first, which will succeed on symlinks because `deleteFile` doesn't follow symlinks
- `deleteTree` when iterating a directory will get the type of symlinks as .sym_link, not as .directory (even if the symlink points to a directory), meaning it will never try to open a symlink as a directory.

```

## Parents

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

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