Archive Tar Bug?
| From: | Geoff Calvert | Date: | Thu, 23 Dec 2004 11:54:15 +0000 |
| Subject: | Archive Tar Bug? | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-16427@lists.php.net to get a copy of this message | ||
I am encountering a problem using archive tar under Windows XP.
I am calling listContent() to get the names of the files in a tar archive,
but the function is failing due to a FALSE return code from _extractList.
Modifying the code to return a TRUE status when _readHeader fails apparently
makes the whole thing work - but I wonder if I am just masking another
problem.
My guess is that the _readHeader is failing because I am at the end of the
archive - which is in effect a success condition.
Here is the code snippet from _extractList:
While (strlen($v_binary_data = $this->_readBlock()) != 0)
{
$v_extract_file = FALSE;
$v_extraction_stopped = 0;
if (!$this->_readHeader($v_binary_data, $v_header)) {
return true;
// return false;
}
if ($v_header['filename'] == '')
continue;
Any thoughts?
Geoff Calvert
IT Officer
School of Geography and the Environment
geoff.calvert@geog.ox.ac.uk
IT-FAQ http://www.geog.ox.ac.uk/faq/index.html