Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 1.5.0

Bug #11871 wrong result of ::listContent() if filename begins or ends with space
Submitted: 2007-08-20 08:19 UTC
From: seb7val Assigned: mrook
Status: Closed Package: Archive_Tar (version 1.3.2)
PHP Version: 5.2.3 OS: Linux
Roadmaps: 1.3.4    
Subscription  


 [2007-08-20 08:19 UTC] seb7val (Sebastian Volland)
Description: ------------ 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: --------------- <?php require_once('Archive/Tar.php'); @unlink('./test.tar'); $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'

Comments

 [2009-08-19 03:04 UTC] mrook (Michiel Rook)
-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.