mirror of https://github.com/spf13/afero.git
Don't hide errors while reading from ZIP files
This commit is contained in:
parent
9b520d0821
commit
344ad9d197
|
@ -33,9 +33,10 @@ func (f *File) fillBuffer(offset int64) (err error) {
|
|||
return
|
||||
}
|
||||
buf := make([]byte, int(offset)-len(f.buf))
|
||||
n, _ := io.ReadFull(f.reader, buf)
|
||||
if n > 0 {
|
||||
if n, readErr := io.ReadFull(f.reader, buf); n > 0 {
|
||||
f.buf = append(f.buf, buf[:n]...)
|
||||
} else if readErr != nil {
|
||||
err = readErr
|
||||
}
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue