]> go.fuhry.dev Git - fsnotify.git/commit
kqueue: don't set up watchers on unreadable files (#479)
authorMartin Tournoij <martin@arp242.net>
Sat, 6 Aug 2022 16:40:15 +0000 (18:40 +0200)
committerGitHub <noreply@github.com>
Sat, 6 Aug 2022 16:40:15 +0000 (18:40 +0200)
commit8ab3b84129d248db26a9760f389b4c9686ba4031
tree939c612f8cfc8a41a89baefc1b89e182dd2ddd1a
parenta4bcdf828f946294756358a943fbf150804ca14c
kqueue: don't set up watchers on unreadable files (#479)

Watching an entire directory would fail if it contains a file we can't
read due to permission errors. That's obviously not ideal, so just skip
the file.

Also add a test for trying to watch a directory where the permissions
are denied, and test the error is what's expected; this prevents
regressions like in #393.

Fixes #439
.github/workflows/test.yml
integration_test.go
internal/unix.go [new file with mode: 0644]
internal/windows.go [new file with mode: 0644]
kqueue.go