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

git-svn-id: https://develop.svn.wordpress.org/trunk@13850 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2010-03-28 01:07:03 +00:00
parent c784614283
commit 244addfc0d

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;