From 515487d39c55f5a692caf911c07e1181ebc47580 Mon Sep 17 00:00:00 2001 From: ryan 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: http://svn.automattic.com/wordpress/trunk@11082 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- 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') )