correctly handle eof
This commit is contained in:
parent
fb1d33cc17
commit
e50b2e59e9
1 changed files with 5 additions and 1 deletions
|
@ -34,9 +34,13 @@ func (pt *Progresser) Read(p []byte) (int, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if err != io.EOF {
|
||||||
return n, errors.Wrap(err, "failed to read")
|
return n, errors.Wrap(err, "failed to read")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return n, err
|
||||||
|
}
|
||||||
|
|
||||||
type GenericUpdate struct {
|
type GenericUpdate struct {
|
||||||
Progress float64
|
Progress float64
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue