Fix --download-file option not showing progress bar

This commit is contained in:
Sude 2021-11-20 12:02:42 +02:00
parent 695916af4c
commit ab3a2019e4

View File

@ -1120,7 +1120,9 @@ CURLcode Downloader::downloadFile(const std::string& url, const std::string& fil
curl_easy_setopt(curlhandle, CURLOPT_URL, url.c_str()); curl_easy_setopt(curlhandle, CURLOPT_URL, url.c_str());
curl_easy_setopt(curlhandle, CURLOPT_WRITEDATA, outfile); curl_easy_setopt(curlhandle, CURLOPT_WRITEDATA, outfile);
curl_easy_setopt(curlhandle, CURLOPT_FILETIME, 1L); curl_easy_setopt(curlhandle, CURLOPT_FILETIME, 1L);
curl_easy_setopt(curlhandle, CURLOPT_NOPROGRESS, 0);
res = this->beginDownload(); res = this->beginDownload();
curl_easy_setopt(curlhandle, CURLOPT_NOPROGRESS, 1);
fclose(outfile); fclose(outfile);