Skip to content
This repository was archived by the owner on May 12, 2022. It is now read-only.

Commit 09fa19e

Browse files
author
Nik Barham
committed
Changing version down to "1.0" for non 64bit Zips, for MacOSX compatability
1 parent 6880e64 commit 09fa19e

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Diff for: src/ZipStream.php

+8-7
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@
6969
* $zip->finish();
7070
*/
7171
class ZipStream {
72-
const VERSION = '0.1.0';
73-
const ZIP_VERSION = 0x002D;
72+
const VERSION = '0.2.0';
73+
const ZIP_VERSION = 0x000A;
74+
const ZIP_VERSION_64 = 0x002D;
7475

7576
const METHOD_STORE = 0x00;
7677
const METHOD_DEFLATE = 0x08;
@@ -486,7 +487,7 @@ protected function addFileHeader($name, $opt, $meth) {
486487
$fields = [
487488
// Header
488489
['V', static::FILE_HEADER_SIGNATURE],
489-
['v', static::ZIP_VERSION], // Version needed to Extract
490+
['v', static::ZIP_VERSION_64], // Version needed to Extract
490491
['v', 0b00001000], // General purpose bit flags - data descriptor flag set
491492
['v', $meth], // Compression method
492493
['V', $time], // Timestamp (DOS Format)
@@ -717,8 +718,8 @@ protected function addCdrFile($args) {
717718
{
718719
$fields = [
719720
['V', static::CDR_FILE_SIGNATURE], // Central file header signature
720-
['v', static::ZIP_VERSION], // Made by version
721-
['v', static::ZIP_VERSION], // Extract by version
721+
['v', static::ZIP_VERSION_64], // Made by version
722+
['v', static::ZIP_VERSION_64], // Extract by version
722723
['v', 0b00001000], // General purpose bit flags - data descriptor flag set
723724
['v', $meth], // Compression method
724725
['V', $time], // Timestamp (DOS Format)
@@ -793,8 +794,8 @@ protected function addCdr64Eof($opt = null) {
793794
$fields = [
794795
['V', static::ZIP64_CDR_EOF_SIGNATURE], // ZIP64 end of central file header signature
795796
['P', 44], // Length of data below this header (length of block - 12) = 44
796-
['v', static::ZIP_VERSION], // Made by version
797-
['v', static::ZIP_VERSION], // Extract by version
797+
['v', static::ZIP_VERSION_64], // Made by version
798+
['v', static::ZIP_VERSION_64], // Extract by version
798799
['V', 0x00], // disk number
799800
['V', 0x00], // no of disks
800801
['P', $num], // no of entries on disk

0 commit comments

Comments
 (0)