summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/download.c2
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);