mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
MDL-74641 repository: Fix wrong increment of temporary file for small sizes
This commit is contained in:
parent
9ba1423359
commit
a73e0ac76d
@ -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';
|
||||
|
Loading…
x
Reference in New Issue
Block a user