Bug #19289 [Opn]: Invalid tar file generated
| From: | mrook@php.net | Date: | Thu, 16 Feb 2012 18:41:58 +0000 |
| Subject: | Bug #19289 [Opn]: Invalid tar file generated | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8275@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=19289&edit=1
ID: 19289
Updated by: mrook@php.net
Reported By: slusarz at curecanti dot org
Summary: Invalid tar file generated
Status: Open
Type: Bug
Package: Archive_Tar
Operating System: Linux
Package Version: 1.3.8
PHP Version: 5.3.10
Roadmap Versions:
New Comment:
Can you please verify the installed version of Archive_Tar? Using your
test script I
can't reproduce the error. Also, a similar bug was reported and fixed
(#5452).
Previous Comments:
------------------------------------------------------------------------
[2012-02-13 06:38:06] slusarz
Description:
------------
Discovered when packaging a PEAR release for the Horde project... the
tgz file was created but attempting to decompress the file would give
the error "tar: A lone zero block at #".
Test script to reproduce is below.
Test script:
---------------
@unlink('test1.txt');
file_put_contents('test1.txt', 'a');
@unlink('test2.txt');
file_put_contents('test2.txt', 'b');
require_once 'Archive/Tar.php';
@unlink('test.tgz');
$a = new Archive_Tar('test.tgz', 'gz');
$a->createModify(array('test1.txt'), '');
$a->addModify(array('test2.txt'), '');
Expected result:
----------------
After running test script, test.tgz file is created.
Attempting to untar, this is the output:
slusarz@bigworm % tar zxvf test.tgz
test2.txt
tar: A lone zero block at 3
Actual result:
--------------
Verified that adding the '-i' option to tar (--ignore zeros) fixes
decompression:
slusarz@bigworm % tar zxvfi test.tgz
test1.txt
test2.txt
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=19289&edit=1