Fix ftpext dirlist for ftp servers that return 8 fields instead of 9. see #5586
git-svn-id: http://svn.automattic.com/wordpress/trunk@6914 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
b7ef7b598f
commit
b04d17f011
|
@ -364,7 +364,8 @@ class WP_Filesystem_FTPext{
|
||||||
if (substr(strtolower($line), 0, 5) == 'total') continue;
|
if (substr(strtolower($line), 0, 5) == 'total') continue;
|
||||||
$struc = array();
|
$struc = array();
|
||||||
$current = preg_split("/[\s]+/",$line,9);
|
$current = preg_split("/[\s]+/",$line,9);
|
||||||
$struc['name'] = str_replace('//','',$current[8]);
|
$name_num = count($current) - 1;
|
||||||
|
$struc['name'] = str_replace('//','',$current[$name_num]);
|
||||||
|
|
||||||
if( '.' == $struc['name'][0] && !$incdot)
|
if( '.' == $struc['name'][0] && !$incdot)
|
||||||
continue;
|
continue;
|
||||||
|
@ -398,6 +399,7 @@ class WP_Filesystem_FTPext{
|
||||||
//File
|
//File
|
||||||
$ret[$struc['name']] = $struc;
|
$ret[$struc['name']] = $struc;
|
||||||
}
|
}
|
||||||
|
return $ret;
|
||||||
}
|
}
|
||||||
function __destruct(){
|
function __destruct(){
|
||||||
if( $this->link )
|
if( $this->link )
|
||||||
|
|
Loading…
Reference in New Issue