fix: if eof, return the byte count
This commit is contained in:
parent
35b64515d7
commit
ba60a6c729
|
@ -223,6 +223,9 @@ func (i *ImportReader) Close() error {
|
||||||
func (i *ImportReader) Read(p []byte) (n int, err error) {
|
func (i *ImportReader) Read(p []byte) (n int, err error) {
|
||||||
n, err = i.reader.Read(p)
|
n, err = i.reader.Read(p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
if err == io.EOF {
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
return 0, err
|
return 0, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue