Commit 137b2461 authored by Aaron Jacobs's avatar Aaron Jacobs

Fixed a bug.

parent 7b77e1d5
......@@ -76,12 +76,14 @@ func (fs *HelloFS) ReadDir(
return
}
// Check the offset.
if req.Offset >= fuse.DirOffset(len(entries)) {
// Grab the range of interest.
if req.Offset > fuse.DirOffset(len(entries)) {
err = fuse.EIO
return
}
entries = entries[req.Offset:]
// Resume at the specified offset into the array.
for _, e := range entries {
resp.Data = fuseutil.AppendDirent(resp.Data, e)
......
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