diff options
Diffstat (limited to 'cmd/btrfs-mount')
-rw-r--r-- | cmd/btrfs-mount/subvol_fuse.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/btrfs-mount/subvol_fuse.go b/cmd/btrfs-mount/subvol_fuse.go index a96153a..da7c5d8 100644 --- a/cmd/btrfs-mount/subvol_fuse.go +++ b/cmd/btrfs-mount/subvol_fuse.go @@ -301,11 +301,10 @@ func (sv *Subvolume) ReadFile(_ context.Context, op *fuseops.ReadFileOp) error { return syscall.EBADF } - size := op.Size var dat []byte if op.Dst != nil { - size = util.Min(int64(len(op.Dst)), size) - dat = op.Dst + size := util.Min(int64(len(op.Dst)), op.Size) + dat = op.Dst[:size] } else { dat = make([]byte, op.Size) op.Data = [][]byte{dat} |