Skip to content

Commit

Permalink
Don't hide errors while reading from ZIP files
Browse files Browse the repository at this point in the history
  • Loading branch information
hillu committed Mar 30, 2020
1 parent 9b520d0 commit 2d5f880
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion zipfs/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ func (f *File) fillBuffer(offset int64) (err error) {
return
}
buf := make([]byte, int(offset)-len(f.buf))
n, _ := io.ReadFull(f.reader, buf)
var n int
n, err = io.ReadFull(f.reader, buf)
if n > 0 {
f.buf = append(f.buf, buf[:n]...)
}
Expand Down

0 comments on commit 2d5f880

Please sign in to comment.