issue 2351, fixed a bug that update core by easyinstall is failed.

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.3.2@11199 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
flyskyko 2012-09-11 00:41:13 +00:00
parent c451d17ebc
commit c953abb0ba

View file

@ -99,6 +99,10 @@ class tar {
// PRIVATE ACCESS FUNCTION
function __parseNullPaddedString($string) {
$position = strpos($string,chr(0));
if(!$position)
{
$position = strlen($string);
}
return substr($string,0,$position);
}
@ -165,7 +169,7 @@ class tar {
if(strtolower($file_type) == 'l' || $file_name == '././@LongLink')
{
$flag_longlink = true;
$longlink_name = $file_contents;
$longlink_name = $this->__parseNullPaddedString($file_contents);
}
elseif($file_type == '0') {
// Increment number of files