From c08043788acd2ade660fc2e0b862d1f87462c6b2 Mon Sep 17 00:00:00 2001 From: Aaron Jacobs Date: Wed, 29 Jul 2015 09:49:28 +1000 Subject: [PATCH] Fixed conversions.go. --- conversions.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/conversions.go b/conversions.go index feedf0d..481fc39 100644 --- a/conversions.go +++ b/conversions.go @@ -252,7 +252,7 @@ func convertInMessage( Inode: fuseops.InodeID(m.Header().Nodeid), Handle: fuseops.HandleID(in.Fh), Offset: int64(in.Offset), - Size: int(in.Size), + Dst: make([]byte, in.Size), } case fusekernel.OpReaddir: @@ -266,7 +266,7 @@ func convertInMessage( Inode: fuseops.InodeID(m.Header().Nodeid), Handle: fuseops.HandleID(in.Fh), Offset: fuseops.DirOffset(in.Offset), - Size: int(in.Size), + Dst: make([]byte, in.Size), } case fusekernel.OpRelease: @@ -486,7 +486,7 @@ func (c *Connection) kernelResponseForOp( case *fuseops.ReadDirOp: m = c.getOutMessage() - m.Append(o.Data) + m.Append(o.Dst[:o.BytesRead]) case *fuseops.ReleaseDirHandleOp: m = c.getOutMessage() @@ -498,7 +498,7 @@ func (c *Connection) kernelResponseForOp( case *fuseops.ReadFileOp: m = c.getOutMessage() - m.Append(o.Data) + m.Append(o.Dst[:o.BytesRead]) case *fuseops.WriteFileOp: m = c.getOutMessage()