diff options
author | Martin Szulecki | 2012-07-17 16:24:45 +0200 |
---|---|---|
committer | Nikias Bassen | 2012-07-17 16:24:45 +0200 |
commit | 08895904b5545f340840905d7c0836f929376de6 (patch) | |
tree | b078b392e16d13a7a5a087c7c60cd7c239ddbbc7 /src | |
parent | 955f4ff05add89bb665a0a9f7a3aeffb009fc8c3 (diff) | |
download | idevicerestore-08895904b5545f340840905d7c0836f929376de6.tar.gz idevicerestore-08895904b5545f340840905d7c0836f929376de6.tar.bz2 |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/download.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |