mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -06:00
- DownloadThread now write in binary mode (should fix problems on Windows)
This commit is contained in:
@@ -73,7 +73,7 @@ void subDownloadThread::run(){
|
|||||||
filePath = tmpfile->fileName();
|
filePath = tmpfile->fileName();
|
||||||
}
|
}
|
||||||
delete tmpfile;
|
delete tmpfile;
|
||||||
FILE *f = fopen(filePath.toUtf8().data(), "w");
|
FILE *f = fopen(filePath.toUtf8().data(), "wb");
|
||||||
if(!f) {
|
if(!f) {
|
||||||
std::cerr << "couldn't open destination file" << "\n";
|
std::cerr << "couldn't open destination file" << "\n";
|
||||||
return;
|
return;
|
||||||
@@ -113,7 +113,7 @@ void subDownloadThread::run(){
|
|||||||
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
|
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fwrite);
|
||||||
curl_easy_setopt(curl, CURLOPT_WRITEDATA, f);
|
curl_easy_setopt(curl, CURLOPT_WRITEDATA, f);
|
||||||
// Verbose
|
// Verbose
|
||||||
//curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
curl_easy_setopt(curl, CURLOPT_VERBOSE, 1);
|
||||||
// No progress info (we don't use it)
|
// No progress info (we don't use it)
|
||||||
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
|
curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 1);
|
||||||
// Redirections
|
// Redirections
|
||||||
|
|||||||
Reference in New Issue
Block a user