Revert "Update curl.cpp: reduce memory cache use (#2157)" (#2170)

This reverts commit 5b487f651a.
This commit is contained in:
Takeshi Nakatani 2023-05-27 20:33:43 +09:00 committed by GitHub
parent 5b487f651a
commit 0d6b02090e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -703,12 +703,7 @@ size_t S3fsCurl::DownloadWriteCallback(void* ptr, size_t size, size_t nmemb, voi
}
pCurl->partdata.startpos += totalwrite;
pCurl->partdata.size -= totalwrite;
// flush the file and clean the page cache
if (pCurl->partdata.size == 0){
fdatasync(pCurl->partdata.fd);
}
return totalwrite;
}