From d02558b3a6d2fdbc4218ca247357ec4b74462c9d Mon Sep 17 00:00:00 2001 From: Ben McClelland Date: Mon, 3 Dec 2018 10:21:50 -0800 Subject: [PATCH] fix count-changes for query changes --- examples/count-changes/main.go | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/examples/count-changes/main.go b/examples/count-changes/main.go index 3e7abfc..baf60a4 100644 --- a/examples/count-changes/main.go +++ b/examples/count-changes/main.go @@ -27,18 +27,15 @@ type server struct { } func queryPopulation(basedir string, update chan<- int) error { - f, err := os.Open(path) + f, err := os.Open(basedir) if err != nil { return err } defer f.Close() - h, err := scoutfs.NewQuery(basedir, - scoutfs.ByMSeq(scoutfs.InodesEntry{}, - scoutfs.InodesEntry{Major: max64, Minor: max32, Ino: max64})) - if err != nil { - return fmt.Errorf("scoutfs new handle: %v", err) - } + min := scoutfs.InodesEntry{} + max := scoutfs.InodesEntry{Major: max64, Minor: max32, Ino: max64} + h := scoutfs.NewQuery(f, scoutfs.ByMSeq(min, max)) count := 0 for {