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

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

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

Visibility: public

Requested revision: f9549504851c9445ea474e78cedc5d52a5b21f36

Requested commit: f9549504851c9445ea474e78cedc5d52a5b21f36

Commit: f9549504851c9445ea474e78cedc5d52a5b21f36

Tree: 8dc08e4caf6265fd78f5528ef5e9acf4a6c5eb45

Author: Loris Cro

Committer: Alex Rønne Petersen

## 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

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

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