common: always reset progress to 0 for downloads

This commit is contained in:
Mitchell Hashimoto 2015-06-22 14:59:38 -07:00
parent 117579808f
commit 0416939c08
1 changed files with 3 additions and 0 deletions

View File

@ -209,6 +209,9 @@ func (d *HTTPDownloader) Download(dst *os.File, src *url.URL) error {
return err
}
// Reset our progress
d.progress = 0
// Make the request. We first make a HEAD request so we can check
// if the server supports range queries. If the server/URL doesn't
// support HEAD requests, we just fall back to GET.