GroupReader#Read: return io.EOF if file is empty

This commit is contained in:
Anton Kaliaev 2017-10-23 13:02:14 +04:00
parent c75ddd0fa3
commit 21b2c26fb1
No known key found for this signature in database
GPG Key ID: 7B6881D965918214
1 changed files with 2 additions and 0 deletions

View File

@ -606,6 +606,8 @@ func (gr *GroupReader) Read(p []byte) (n int, err error) {
}
} else if err != nil {
return n, err
} else if nn == 0 { // empty file
return n, err
}
}