Merge pull request #8333 from nextcloud/bugfix/avoidFailingSmallDownloadForDecompressedSafetyCheck

fix(get/file): avoid failing to download files under 20 MiB
This commit is contained in:
Matthieu Gallien 2025-06-04 14:34:54 +02:00 committed by GitHub
commit 07fa350ff1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);