Attempt to work around Mac FTP Server security implications of using '-a' in FTP. Props eoinomurchu. See #12232

git-svn-id: http://svn.automattic.com/wordpress/trunk@13850 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-03-28 01:07:03 +00:00
parent c0974fb518
commit a47cdd86cb

View File

@ -332,7 +332,10 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
$limit_file = false;
}
$list = @ftp_rawlist($this->link, '-a ' . $path, false);
$pwd = @ftp_pwd();
$chdir = @ftp_chdir($this->link, $path);
$list = @ftp_rawlist($this->link, '-a', false);
@ftp_chdir($this->link, $pwd);
if ( empty($list) ) // Empty array = non-existent folder (real folder will show . at least)
return false;