Commit f17521b7 authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

Merge pull request #864 from jbenet/fix/fuse-read

take offset into account for computing read size
parents 4e7140dd da47c218
......@@ -170,7 +170,7 @@ func (s *Node) Read(ctx context.Context, req *fuse.ReadRequest, resp *fuse.ReadR
return err
}
buf := resp.Data[:min(req.Size, int(r.Size()))]
buf := resp.Data[:min(req.Size, int(r.Size()-req.Offset))]
n, err := io.ReadFull(r, buf)
if err != nil && err != io.EOF {
return err
......
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