1
0

Oops, forgot to return FSWatcher. And remove that syscall.Read.

This commit is contained in:
Alexander Andreev 2022-02-08 00:39:25 +04:00
parent e45bb01f49
commit 8e44aa1477
Signed by: Arav
GPG Key ID: 1327FE8A374CC86F

View File

@ -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
}