Fix ftpext dirlist for ftp servers that return 8 fields instead of 9. see #5586
git-svn-id: https://develop.svn.wordpress.org/trunk@6914 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
c349fa79be
commit
02b1e8d39d
@ -363,8 +363,9 @@ class WP_Filesystem_FTPext{
|
||||
foreach($list as $line){
|
||||
if (substr(strtolower($line), 0, 5) == 'total') continue;
|
||||
$struc = array();
|
||||
$current = preg_split("/[\s]+/",$line,9);
|
||||
$struc['name'] = str_replace('//','',$current[8]);
|
||||
$current = preg_split("/[\s]+/",$line,9);
|
||||
$name_num = count($current) - 1;
|
||||
$struc['name'] = str_replace('//','',$current[$name_num]);
|
||||
|
||||
if( '.' == $struc['name'][0] && !$incdot)
|
||||
continue;
|
||||
@ -398,6 +399,7 @@ class WP_Filesystem_FTPext{
|
||||
//File
|
||||
$ret[$struc['name']] = $struc;
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
function __destruct(){
|
||||
if( $this->link )
|
||||
|
Loading…
Reference in New Issue
Block a user