fix: if eof, return the byte count

This commit is contained in:
Derrick Hammer 2024-03-22 20:23:14 -04:00
parent 35b64515d7
commit ba60a6c729
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -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
} }