mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge pull request #8333 from nextcloud/bugfix/avoidFailingSmallDownloadForDecompressedSafetyCheck
fix(get/file): avoid failing to download files under 20 MiB
This commit is contained in:
commit
07fa350ff1
@ -29,6 +29,8 @@
|
||||
|
||||
namespace OCC {
|
||||
|
||||
static constexpr auto CustomDecompressedSafetyCheckThreshold = 20 * 1024 * 1024;
|
||||
|
||||
Q_LOGGING_CATEGORY(lcGetJob, "nextcloud.sync.networkjob.get", QtInfoMsg)
|
||||
Q_LOGGING_CATEGORY(lcPropagateDownload, "nextcloud.sync.propagator.download", QtInfoMsg)
|
||||
|
||||
@ -114,6 +116,7 @@ void GETFileJob::start()
|
||||
}
|
||||
|
||||
req.setPriority(QNetworkRequest::LowPriority); // Long downloads must not block non-propagation jobs.
|
||||
req.setDecompressedSafetyCheckThreshold(CustomDecompressedSafetyCheckThreshold);
|
||||
|
||||
if (_directDownloadUrl.isEmpty()) {
|
||||
sendRequest("GET", makeDavUrl(path()), req);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user