Commit 794d8cbe authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

UnionFs: insert all readdir entries directly into the channel.

parent c833c477
......@@ -644,8 +644,7 @@ func (me *UnionFs) OpenDir(directory string) (stream chan fuse.DirEntry, status
results[_READONLY] = 0, false
}
stream = make(chan fuse.DirEntry)
go func() {
stream = make(chan fuse.DirEntry, len(results))
for k, v := range results {
stream <- fuse.DirEntry{
Name: k,
......@@ -653,7 +652,6 @@ func (me *UnionFs) OpenDir(directory string) (stream chan fuse.DirEntry, status
}
}
close(stream)
}()
return stream, fuse.OK
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment