From 79b177684f1ed4d372938561bfb4db9d866abadd Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=93=81=E5=93=A5?= Date: Tue, 30 Jun 2015 14:22:22 +0800 Subject: [PATCH] kqueue: watch for rename events on subdirectories if flags has no syscall.NOTE_RENAME, subdir rename event will not notify. closes #83 --- CHANGELOG.md | 1 + kqueue.go | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b9e0fcb..d0ede67 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ * inotify: use epoll_create1 for arm64 support (requires Linux 2.6.27 or later) [#100](https://github.com/go-fsnotify/fsnotify/pull/100) (thanks @suihkulokki) * inotify: fix path leaks [#73](https://github.com/go-fsnotify/fsnotify/pull/73) (thanks @chamaken) +* kqueue: watch for rename events on subdirectories [#83](https://github.com/go-fsnotify/fsnotify/pull/83) (thanks @guotie) ## v1.2.1 / 2015-10-14 diff --git a/kqueue.go b/kqueue.go index f8a364d..821955f 100644 --- a/kqueue.go +++ b/kqueue.go @@ -417,7 +417,7 @@ func (w *Watcher) internalWatch(name string, fileInfo os.FileInfo) error { flags := w.dirFlags[name] w.mu.Unlock() - flags |= syscall.NOTE_DELETE + flags |= syscall.NOTE_DELETE | syscall.NOTE_RENAME return w.addWatch(name, flags) } -- 2.50.1