提交 6c064d1f 作者: zramsay

bugfix: copy the correct variable

License: MIT
Signed-off-by: 's avatarZach Ramsay <zach.ramsay@gmail.com>
上级 b77d5aa1
......@@ -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
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论