summaryrefslogtreecommitdiffstats
path: root/system
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2007-04-27 19:03:10 +0200
committerDerek Jones <derek.jones@ellislab.com>2007-04-27 19:03:10 +0200
commit44a736f74bd6a7852cba442e5ad4126068caf626 (patch)
tree8c8ff04af5d5955b7b4f99db9b3aab704c9766fb /system
parentcea5dbe08c909c5efa54bbaa56980b2288bbd296 (diff)
modified _add_data() to be compatible with OS X
(removed CRC and length from end of file stream)
Diffstat (limited to 'system')
-rw-r--r--system/libraries/Zip.php7
1 files changed, 2 insertions, 5 deletions
diff --git a/system/libraries/Zip.php b/system/libraries/Zip.php
index 377c38741..518c97836 100644
--- a/system/libraries/Zip.php
+++ b/system/libraries/Zip.php
@@ -156,7 +156,7 @@ class CI_Zip {
$crc32 = crc32($data);
$gzdata = gzcompress($data);
- $gzdata = substr(substr($gzdata, 0, strlen($gzdata) - 4), 2);
+ $gzdata = substr($gzdata, 2, -4);
$newlen = strlen($gzdata);
$this->zipdata[] = "\x50\x4b\x03\x04\x14\x00\x00\x00\x08\x00\x00\x00\x00\x00"
@@ -166,10 +166,7 @@ class CI_Zip {
.pack('v', strlen($filepath))
.pack('v', 0)
.$filepath
- .$gzdata
- .pack('V', $crc32)
- .pack('V', $newlen)
- .pack('V', $oldlen);
+ .$gzdata;
$newoffset = strlen(implode("", $this->zipdata));