MDL-74641 repository: Fix wrong increment of temporary file for small sizes

This commit is contained in:
meirzamoodle
2024-02-07 02:34:18 +01:00
committed by Jenkins
parent 427b0d3fee
commit 5907407061
+2 -2
View File
@@ -502,8 +502,8 @@ class zip_packer extends file_packer {
$content = '';
while (!feof($fz)) {
$content .= fread($fz, 262143);
$realfilesize += strlen($content); // Current file size.
$totalsizebytes += strlen($content);
$realfilesize = strlen($content); // Current file size.
$totalsizebytes = strlen($content);
if ($realfilesize > $size ||
($areamaxbytes != FILE_AREA_MAX_BYTES_UNLIMITED && $totalsizebytes > $areamaxbytes)) {
$processed[0] = 'cannotunzipquotaexceeded';