# fix \`link.renameTmpIntoCache\` on windows when dest dir exists\. · gitcafe/zig

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

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

Visibility: public

Requested revision: b9d86c6bc8e5d475ed8613bb241d1520377e629c

Requested commit: b9d86c6bc8e5d475ed8613bb241d1520377e629c

Commit: b9d86c6bc8e5d475ed8613bb241d1520377e629c

Tree: 20371ff709d5653d4c24fae485b6fad1be6b5392

Author: jagt

Committer: Andrew Kelley

## Message

```
fix `link.renameTmpIntoCache` on windows when dest dir exists.

Previously it would fail as `renameW` do not ever fail with
`PathAlreadyExists`.

As a workaround we check for dest dir existence before rename
on Windows.

```

## Parents

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

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