]> go.fuhry.dev Git - fsnotify.git/commit
kqueue: better error if watching a file fails (#471)
authorMartin Tournoij <martin@arp242.net>
Fri, 29 Jul 2022 18:28:22 +0000 (20:28 +0200)
committerGitHub <noreply@github.com>
Fri, 29 Jul 2022 18:28:22 +0000 (20:28 +0200)
commitcc159086503f18485413d79637564215c8821fdc
treef855b5128328db3e8a95100d291195fa628f2717
parentc4e64e46fbf40e1eef3e4b3f10082877da3ad296
kqueue: better error if watching a file fails (#471)

kqueue requires opening a file descriptor for every file; so we read the
directory and do that. If this failed the error was quite unclear; for
example:

"/tmp/fsnotify_permission_denied/": permission denied

This puts the filepath in there:

"/tmp/fsnotify_permission_denied/": "/tmp/fsnotify_permission_denied/test2.log": permission denied

Fixes #270
kqueue.go