Oops, forgot to return FSWatcher. And remove that syscall.Read.
This commit is contained in:
parent
e45bb01f49
commit
8e44aa1477
@ -25,7 +25,7 @@ func NewFSWatcher() (fsw *FSWatcher, err error) {
|
|||||||
|
|
||||||
fsw.wds = make([]int, 0)
|
fsw.wds = make([]int, 0)
|
||||||
|
|
||||||
return nil, nil
|
return fsw, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (fsw *FSWatcher) AddWatch(path string, mask uint32) error {
|
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)
|
fsw.wds = append(fsw.wds, wd)
|
||||||
syscall.Read(fsw.fd, nil)
|
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user