Commit a77ea2f0 authored by Jeromy's avatar Jeromy

fix fuse reading on linux

parent c5f983b5
......@@ -181,8 +181,11 @@ func (s *Node) Read(req *fuse.ReadRequest, resp *fuse.ReadResponse, intr fs.Intr
if err != nil {
return err
}
n, err := io.ReadFull(r, resp.Data[:req.Size])
n, err := r.Read(resp.Data[:req.Size])
if err != nil && err != io.EOF {
return err
}
resp.Data = resp.Data[:n]
lm["res_size"] = n
return err // may be non-nil / not succeeded
return nil // may be non-nil / not succeeded
}
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