common: add the current progress to the total size

This commit is contained in:
Mitchell Hashimoto 2015-06-22 14:58:27 -07:00
parent 9bc0dfa389
commit 117579808f
1 changed files with 1 additions and 1 deletions

View File

@ -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[:])