- // uncompressed case
- downloadSize = std::accumulate(available_patches.begin(),
- available_patches.end(), 0llu, [](unsigned long long const T, DiffInfo const &I) {
- return T + I.patch_hashes.FileSize();
- });
- if (downloadSize != 0)
- {
- unsigned long long const downloadSizeIdx = ServerSize;
- unsigned long long const sizeLimit = downloadSizeIdx * sizeLimitPercent;
- if ((sizeLimit/100) < downloadSize)
- {
- if (Debug)
- std::clog << "Need " << downloadSize << " uncompressed bytes (Limit is " << (sizeLimit/100) << ", "
- << "original is " << downloadSizeIdx << ") so fallback to complete download" << std::endl;
- return false;
- }
- }