Check if not exists and not is_dir before bailing. Props st3ff3n. fixes #9274

git-svn-id: http://svn.automattic.com/wordpress/trunk@11082 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-04-24 17:12:21 +00:00
parent 7651b29cb9
commit 515487d39c

View File

@ -146,7 +146,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
$mode = $this->permission;
if( ! $mode )
return false;
if ( ! $this->exists($file) )
if ( ! $this->exists($file) && ! $this->is_dir($file) )
return false;
if ( ! $recursive || ! $this->is_dir($file) ) {
if ( ! function_exists('ftp_chmod') )