mirror of https://github.com/spf13/afero.git
Fix panic when not filling up zipfs's read buffer
This commit is contained in:
parent
fc99a5d786
commit
e76d1f3bb5
|
@ -61,7 +61,7 @@ func (f *File) Read(p []byte) (n int, err error) {
|
||||||
}
|
}
|
||||||
err = f.fillBuffer(f.offset + int64(len(p)))
|
err = f.fillBuffer(f.offset + int64(len(p)))
|
||||||
n = copy(p, f.buf[f.offset:])
|
n = copy(p, f.buf[f.offset:])
|
||||||
f.offset += int64(len(p))
|
f.offset += int64(n)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue