@cryptotaxi247 / kubo / commits / 0beff4bb4

return the read bytes when EOF is reached

verokarhu committed Sep 28, 2014 at 13:45 UTC 0beff4bb4ad8ab2f9a9c9911f36cb236bd847b36
1 file changed +3
importer/splitting.go
+3
@@ -23,6 +23,9 @@ func (ss *SizeSplitter) Split(r io.Reader) chan []byte {
23 nread, err := r.Read(chunk)
24 if err != nil {
25 if err == io.EOF {
26 + if nread > 0 {
27 + out <- chunk[:nread]
28 + }
29 return
30 }
31 u.PErr("block split error: %v\n", err)