diff options
Diffstat (limited to 'system/libraries/Zip.php')
-rw-r--r-- | system/libraries/Zip.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php index c0a14023d..e99873ae7 100644 --- a/system/libraries/Zip.php +++ b/system/libraries/Zip.php @@ -50,7 +50,7 @@ defined('BASEPATH') OR exit('No direct script access allowed'); * @subpackage Libraries * @category Encryption * @author EllisLab Dev Team - * @link https://codeigniter.com/user_guide/libraries/zip.html + * @link https://codeigniter.com/userguide3/libraries/zip.html */ class CI_Zip { @@ -406,13 +406,14 @@ class CI_Zip { return FALSE; } - return $this->zipdata - .$this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00" + // @see https://github.com/bcit-ci/CodeIgniter/issues/5864 + $footer = $this->directory."\x50\x4b\x05\x06\x00\x00\x00\x00" .pack('v', $this->entries) // total # of entries "on this disk" .pack('v', $this->entries) // total # of entries overall .pack('V', self::strlen($this->directory)) // size of central dir .pack('V', self::strlen($this->zipdata)) // offset to start of central dir ."\x00\x00"; // .zip file comment length + return $this->zipdata.$footer; } // -------------------------------------------------------------------- |