Use int for ReadDirRequest.Size, matching slices.
parent
085c6d19aa
commit
941a56eb0e
|
@ -298,7 +298,7 @@ type ReadDirRequest struct {
|
||||||
|
|
||||||
// The maximum number of bytes to return in ReadDirResponse.Data. A smaller
|
// The maximum number of bytes to return in ReadDirResponse.Data. A smaller
|
||||||
// number is acceptable.
|
// number is acceptable.
|
||||||
Size uint64
|
Size int
|
||||||
}
|
}
|
||||||
|
|
||||||
type ReadDirResponse struct {
|
type ReadDirResponse struct {
|
||||||
|
|
|
@ -69,7 +69,7 @@ func (fs *HelloFS) ReadDir(
|
||||||
// Resume at the specified offset into the array.
|
// Resume at the specified offset into the array.
|
||||||
for _, e := range entries {
|
for _, e := range entries {
|
||||||
resp.Data = fuseutil.AppendDirent(resp.Data, e)
|
resp.Data = fuseutil.AppendDirent(resp.Data, e)
|
||||||
if uint64(len(resp.Data)) > req.Size {
|
if len(resp.Data) > req.Size {
|
||||||
resp.Data = resp.Data[:req.Size]
|
resp.Data = resp.Data[:req.Size]
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue