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

git-svn-id: https://develop.svn.wordpress.org/trunk@11082 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2009-04-24 17:12:21 +00:00
parent ea6c1efcb9
commit d77d35e502
1 changed files with 1 additions and 1 deletions

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') )