Skip to content

Commit

Permalink
bugfix: copy the correct variable
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Zach Ramsay <zach.ramsay@gmail.com>
  • Loading branch information
zramsay committed Jun 3, 2017
1 parent b77d5aa commit 6c064d1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion core/commands/files/files.go
Expand Up @@ -664,7 +664,12 @@ stat' on the file or any of its ancestors.
return
}

n, err := io.Copy(wfd, input)
var r io.Reader = input
if countfound {
r = io.LimitReader(r, int64(count))
}

n, err := io.Copy(wfd, r)
if err != nil {
res.SetError(err, cmds.ErrNormal)
return
Expand Down

0 comments on commit 6c064d1

Please sign in to comment.