# Watch.zig: fixes for windows implementation · gitcafe/zig

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

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

Visibility: public

Requested revision: 9be10ea964f010099124f7aed8e71b0eb1c5d983

Requested commit: 9be10ea964f010099124f7aed8e71b0eb1c5d983

Commit: 9be10ea964f010099124f7aed8e71b0eb1c5d983

Tree: b54e0925201b37895f9779ab8471f352d8da224f

Author: Jarrod Meyer

Committer: Andrew Kelley

## Message

```
Watch.zig: fixes for windows implementation
Using --watch I noticed a couple of issues with my initial attempt. 1) The index I used as 'completion key' was not stable over time, when directories are being added/removed the key no longer corresponds with the intended dir. 2) There exists a race condition in which we receive a completion notification for a directory that was removed. My solution is to generate a key value and associate it with each Directory.

```

## Parents

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

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