Selaa lähdekoodia

lib/fs: Fix kqueue event list (fixes #5308) (#5885)

Simon Frei 6 vuotta sitten
vanhempi
sitoutus
5de9b677c2
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      lib/fs/basicfs_watch_eventtypes_kqueue.go

+ 4 - 2
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
 )