From: 铁哥 Date: Tue, 30 Jun 2015 06:22:22 +0000 (+0800) Subject: kqueue: watch for rename events on subdirectories X-Git-Tag: v1.7.2~212 X-Git-Url: https://go.fuhry.dev/?a=commitdiff_plain;h=79b177684f1ed4d372938561bfb4db9d866abadd;p=fsnotify.git kqueue: watch for rename events on subdirectories if flags has no syscall.NOTE_RENAME, subdir rename event will not notify. closes #83 --- 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) }