]> go.fuhry.dev Git - fsnotify.git/commitdiff
BSD - fix for subdir test
authorChris Howey <chris@howey.me>
Wed, 26 Sep 2012 01:11:20 +0000 (20:11 -0500)
committerChris Howey <chris@howey.me>
Wed, 26 Sep 2012 01:11:20 +0000 (20:11 -0500)
fsnotify_bsd.go

index 015648b7168e7aa10a665ae6894935f56ad5bd92..5f3fb5e1705c7282383ef7f72f0477af678cb4fd 100644 (file)
@@ -138,7 +138,7 @@ func (w *Watcher) addWatch(path string, flags uint32) error {
                w.paths[watchfd] = path
 
                w.finfo[watchfd] = fi
-               if fi.IsDir() {
+               if fi.IsDir() && (flags&NOTE_WRITE) == NOTE_WRITE {
                        errdir := w.watchDirectoryFiles(path)
                        if errdir != nil {
                                return errdir