# std.Build.Watch: fix macos implementation · gitcafe/zig

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

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

Visibility: public

Requested revision: 11b49e90024da21e806a71a7ee62b23572836cee

Requested commit: 11b49e90024da21e806a71a7ee62b23572836cee

Commit: 11b49e90024da21e806a71a7ee62b23572836cee

Tree: 1f69e50db41e470e176d9a5362783a002320d7d6

Author: Loris Cro

Committer: Matthew Lugg

## Message

```
std.Build.Watch: fix macos implementation

The code did one useless thing and two wrong things:

- ref counting was basically a noop
- last_dir_fd was chosen from the wrong index and also under the wrong
  condition

This caused regular crashes on macOS which are now gone.

```

## Parents

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

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