Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update for new OpenDir interface.

  • Loading branch information...
commit d1e74103f5c06954bb1ac9842ae58c3ad094950b 1 parent 3e0dc97
@hanwen authored
Showing with 3 additions and 4 deletions.
  1. +3 −4 fs.go
View
7 fs.go
@@ -278,21 +278,20 @@ func (n *folderNode) fetch() bool {
return true
}
-func (n *folderNode) OpenDir(context *fuse.Context) (stream chan fuse.DirEntry, status fuse.Status) {
+func (n *folderNode) OpenDir(context *fuse.Context) (stream []fuse.DirEntry, status fuse.Status) {
if !n.fetch() {
return nil, fuse.EIO
}
- stream = make(chan fuse.DirEntry, len(n.children))
+ stream = make([]fuse.DirEntry, 0, len(n.children))
for n, f := range n.children {
mode := fuse.S_IFREG | 0644
if f.Filetype() == FILETYPE_FOLDER {
mode = fuse.S_IFDIR | 0755
}
- stream <- fuse.DirEntry{Name: n, Mode: uint32(mode)}
+ stream = append(stream, fuse.DirEntry{Name: n, Mode: uint32(mode)})
}
- close(stream)
return stream, fuse.OK
}
Please sign in to comment.
Something went wrong with that request. Please try again.