]>
go.fuhry.dev Git - fsnotify.git/commit
kqueue: fix removing a directory
Fix regression from #526, which would sometimes fail with something
along the lines of:
--- FAIL: TestWatchRm/remove_watched_directory (1.30s)
helpers_test.go:384: fsnotify.sendDirectoryChangeEvents: open /tmp/TestWatchRmremove_watched_directory2055111636/001: no such file or directory
fsnotify_test.go:750:
have:
REMOVE "/a"
REMOVE "/b"
REMOVE "/c"
REMOVE "/d"
REMOVE "/e"
REMOVE "/f"
REMOVE "/g"
want:
REMOVE "/"
REMOVE "/a"
REMOVE "/b"
REMOVE "/c"
REMOVE "/d"
REMOVE "/e"
REMOVE "/f"
REMOVE "/g"
REMOVE "/h"
REMOVE "/i"
REMOVE "/j"
We can just always ignore a directory no longer existing; kqueue should
still send the correct events.
Also noticed the error on sendFileCreatedEventIfNew() wasn't really
being sent properly, so deal with that as well.