download_strategy: don't check url if already downloaded

Closes Homebrew/homebrew#40859.

Signed-off-by: Xu Cheng <xucheng@me.com>
This commit is contained in:
Xu Cheng 2015-06-18 21:46:47 +08:00
parent 7c83e3ffe3
commit 05d9622c02

View File

@ -270,6 +270,7 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
def fetch
ohai "Downloading #{@url}"
unless cached_location.exist?
urls = actual_urls
unless urls.empty?
ohai "Downloading from: #{urls.last}"
@ -279,7 +280,6 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
end
end
unless cached_location.exist?
had_incomplete_download = temporary_path.exist?
begin
_fetch