From 0416939c08c5552fad71a70951d8012ddfedd9fd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 22 Jun 2015 14:59:38 -0700 Subject: [PATCH] common: always reset progress to 0 for downloads --- common/download.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/download.go b/common/download.go index c895ee1e7..16c0724c3 100644 --- a/common/download.go +++ b/common/download.go @@ -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.