mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
s/bCap/bLen/
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
This commit is contained in:
parent
158bb9bbd5
commit
3a05545851
1 changed files with 4 additions and 4 deletions
|
@ -155,18 +155,18 @@ func (r *multiReadSeeker) Read(b []byte) (int, error) {
|
|||
r.pos = &pos{0, 0}
|
||||
}
|
||||
|
||||
bCap := int64(len(b))
|
||||
bLen := int64(len(b))
|
||||
buf := bytes.NewBuffer(nil)
|
||||
var rdr io.ReadSeeker
|
||||
|
||||
for _, rdr = range r.readers[r.pos.idx:] {
|
||||
readBytes, err := io.CopyN(buf, rdr, bCap)
|
||||
readBytes, err := io.CopyN(buf, rdr, bLen)
|
||||
if err != nil && err != io.EOF {
|
||||
return -1, err
|
||||
}
|
||||
bCap -= readBytes
|
||||
bLen -= readBytes
|
||||
|
||||
if bCap == 0 {
|
||||
if bLen == 0 {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue