From 8e44aa147707c5d1729b8b95d22d452bf0b7d1dd Mon Sep 17 00:00:00 2001 From: "Alexander \"Arav\" Andreev" Date: Tue, 8 Feb 2022 00:39:25 +0400 Subject: [PATCH] Oops, forgot to return FSWatcher. And remove that syscall.Read. --- pkg/watcher/linux.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pkg/watcher/linux.go b/pkg/watcher/linux.go index c3d97ae..a3b4e02 100644 --- a/pkg/watcher/linux.go +++ b/pkg/watcher/linux.go @@ -25,7 +25,7 @@ func NewFSWatcher() (fsw *FSWatcher, err error) { fsw.wds = make([]int, 0) - return nil, nil + return fsw, nil } func (fsw *FSWatcher) AddWatch(path string, mask uint32) error { @@ -35,7 +35,6 @@ func (fsw *FSWatcher) AddWatch(path string, mask uint32) error { } fsw.wds = append(fsw.wds, wd) - syscall.Read(fsw.fd, nil) return nil }