From 1683f487a8d046b4ea11498fcbbe53cfd9d34584 Mon Sep 17 00:00:00 2001 From: Chris Howey Date: Sat, 14 Jul 2012 13:38:01 -0500 Subject: [PATCH] BSD - do not watch moved files (don't know new name) --- fsnotify_bsd.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/fsnotify_bsd.go b/fsnotify_bsd.go index 3053b32..c1ec73d 100644 --- a/fsnotify_bsd.go +++ b/fsnotify_bsd.go @@ -246,6 +246,10 @@ func (w *Watcher) readEvents() { // Move to next event events = events[1:] + + if fileEvent.IsRename() { + w.removeWatch(fileEvent.Name) + } } } } -- 2.50.1