From 08895904b5545f340840905d7c0836f929376de6 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Tue, 17 Jul 2012 16:24:45 +0200 Subject: download: Make sure to disable libcurl progress meter in any case This has lead to the progress meter being added to downloads and thus generating corrupt files. --- src/download.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/download.c') diff --git a/src/download.c b/src/download.c index 206086e..e329f6b 100644 --- a/src/download.c +++ b/src/download.c @@ -128,7 +128,7 @@ int download_to_file(const char* url, const char* filename, int enable_progress) if (enable_progress > 0) curl_easy_setopt(handle, CURLOPT_PROGRESSFUNCTION, (curl_progress_callback)&download_progress); - curl_easy_setopt(handle, CURLOPT_NOPROGRESS, 0); + curl_easy_setopt(handle, CURLOPT_NOPROGRESS, enable_progress > 0 ? 0: 1); curl_easy_setopt(handle, CURLOPT_USERAGENT, "InetURL/1.0"); curl_easy_setopt(handle, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(handle, CURLOPT_URL, url); -- cgit v1.1-32-gdbae