From d77d35e502dc1ff73f61213d7765c975b5b8ea1c Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Fri, 24 Apr 2009 17:12:21 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-filesystem-ftpext.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 54c35e6cbb..8b1e6088d4 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -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') )