diff --git a/Archive/Tar.php b/Archive/Tar.php index 03daa39..bb50ea1 100644 --- a/Archive/Tar.php +++ b/Archive/Tar.php @@ -244,7 +244,7 @@ public function __construct($p_tarname, $p_compress = null, $buffer_length = 512 "a8checksum/a1typeflag/a100link/a6magic/a2version/" . "a32uname/a32gname/a8devmajor/a8devminor/a131prefix"; } else { - $this->_fmt = "Z100filename/Z8mode/Z8uid/Z8gid/Z12size/Z12mtime/" . + $this->_fmt = "Z100filename/Z8mode/Z8uid/Z8gid/a12size/Z12mtime/" . "Z8checksum/Z1typeflag/Z100link/Z6magic/Z2version/" . "Z32uname/Z32gname/Z8devmajor/Z8devminor/Z131prefix"; } diff --git a/tests/big.phpt b/tests/big.phpt new file mode 100644 index 0000000..ad5f9c7 --- /dev/null +++ b/tests/big.phpt @@ -0,0 +1,21 @@ +--TEST-- +tests if files > 8G are supported +--SKIPIF-- +--FILE-- +listContent(); +$found_big_file = false; +foreach ($content as $item) { + if ($item['filename'] === 'big_archive/8.5G_file') { + $found_big_file = true; + $phpunit->assertEquals(9126805504, $item['size'], 'size of big file correct'); + } +} +$phpunit->assertTrue($found_big_file, 'found the big file in the archive'); +echo 'tests done'; +?> +--CLEAN-- +--EXPECT-- +tests done diff --git a/tests/big.tar.bz2 b/tests/big.tar.bz2 new file mode 100644 index 0000000..ec443f1 Binary files /dev/null and b/tests/big.tar.bz2 differ