common: add the current progress to the total size
This commit is contained in:
parent
9bc0dfa389
commit
117579808f
|
@ -249,7 +249,7 @@ func (d *HTTPDownloader) Download(dst *os.File, src *url.URL) error {
|
|||
return err
|
||||
}
|
||||
|
||||
d.total = uint(resp.ContentLength)
|
||||
d.total = d.progress + uint(resp.ContentLength)
|
||||
var buffer [4096]byte
|
||||
for {
|
||||
n, err := resp.Body.Read(buffer[:])
|
||||
|
|
Loading…
Reference in New Issue