Edit report at http://pear.php.net/bugs/bug.php?id=11871&edit=1

ID: 11871
Updated by: mrook@php.net
Reported By: sebastian-php at 7val dot com
Summary: wrong result of ::listContent() if filename begins or
ends with space
-Status: Open
+Status: Closed
Type: Bug
Package: Archive_Tar
Operating System: Linux
Package Version: 1.3.2
PHP Version: 5.2.3
-Assigned To:
+Assigned To: mrook
Roadmap Versions:
New Comment:

-Status: Open
+Status: Closed
-Assigned To:
+Assigned To: mrook
This bug has been fixed in CVS.

If this was a documentation problem, the fix will appear on
pear.php.net by the end of next Sunday (CET).

If this was a problem with the pear.php.net website, the change should
be live shortly.

Otherwise, the fix will appear in the package's next release.

Thank you for the report and for helping us make PEAR better.

Previous Comments:

[2007-08-20 04:19:52] seb7val

Archive_Tar::listContent() cuts off the space character (' ') of file
names, if the character is at the beginning or the end of the file name.

The method Archive_Tar::extract() handles these files as expected.

Test script:



$a = new Archive_Tar('./test.tar');

$a->addString('test file name ', 'huhu');
$a->addString(' another test', 'huhu');

$l = $a->listContent();

echo var_export($l[0]['filename']) . "\n";
echo var_export($l[1]['filename']) . "\n";


Expected result:
'test file name '
' another test'

Actual result:
'test file name'
'another test'


Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouppear-bugs @
postedAug 18, '09 at 9:04p
activeAug 18, '09 at 9:04p

1 user in discussion

Mrook: 1 post



site design / logo © 2022 Grokbase