From 5de9b677c2f28628682c910b83cbd89f380c37f2 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Tue, 23 Jul 2019 14:11:15 +0200 Subject: [PATCH] lib/fs: Fix kqueue event list (fixes #5308) (#5885) --- lib/fs/basicfs_watch_eventtypes_kqueue.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/fs/basicfs_watch_eventtypes_kqueue.go b/lib/fs/basicfs_watch_eventtypes_kqueue.go index 4b7b10ea7..d1fe209de 100644 --- a/lib/fs/basicfs_watch_eventtypes_kqueue.go +++ b/lib/fs/basicfs_watch_eventtypes_kqueue.go @@ -11,7 +11,9 @@ package fs import "github.com/syncthing/notify" const ( - subEventMask = notify.NoteDelete | notify.NoteWrite | notify.NoteRename - permEventMask = notify.NoteAttrib + // Platform independent notify.Create is required, as kqueue does not have + // any event signalling file creation, but notify does generate those internally. + subEventMask = notify.NoteDelete | notify.NoteWrite | notify.NoteRename | notify.Create + permEventMask = notify.NoteAttrib | notify.NoteExtend rmEventMask = notify.NoteDelete | notify.NoteRename )