Return false on WP_Filesystem_FTPext::dirlist() for non-existant folders. See #12232. See #12057

git-svn-id: http://svn.automattic.com/wordpress/trunk@14120 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-04-17 04:00:59 +00:00
parent e8c8ef08f0
commit 629432887e
1 changed files with 2 additions and 1 deletions

View File

@ -338,7 +338,8 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
}
$pwd = @ftp_pwd($this->link);
$chdir = @ftp_chdir($this->link, $path);
if ( ! @ftp_chdir($this->link, $path) ) // Cant change to folder = folder doesnt exist
return false;
$list = @ftp_rawlist($this->link, '-a', false);
@ftp_chdir($this->link, $pwd);