From: Matt Joiner Date: Wed, 1 Apr 2015 01:15:44 +0000 (+1100) Subject: fs: Root node wasn't listing: Bazil keeps changing his interface X-Git-Tag: v1.0.0~1222 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=f58c7203c7e924d6a625f05dfb0fbd8986193c1b;p=btrtrc.git fs: Root node wasn't listing: Bazil keeps changing his interface --- diff --git a/fs/torrentfs.go b/fs/torrentfs.go index 270bf3e4..3ebbbf75 100644 --- a/fs/torrentfs.go +++ b/fs/torrentfs.go @@ -48,7 +48,11 @@ func (fs *TorrentFS) Init(ctx context.Context, req *fuse.InitRequest, resp *fuse return nil } -var _ fusefs.NodeForgetter = rootNode{} +var ( + _ fusefs.NodeForgetter = rootNode{} + _ fusefs.HandleReadDirAller = rootNode{} + _ fusefs.HandleReadDirAller = dirNode{} +) type rootNode struct { fs *TorrentFS @@ -260,7 +264,7 @@ func (me rootNode) Lookup(ctx context.Context, name string) (_node fusefs.Node, return } -func (me rootNode) ReadDir(ctx context.Context) (dirents []fuse.Dirent, err error) { +func (me rootNode) ReadDirAll(ctx context.Context) (dirents []fuse.Dirent, err error) { for _, t := range me.fs.Client.Torrents() { if t.Info == nil { continue