Index: class-wp-filesystem-ftpext.php
===================================================================
--- class-wp-filesystem-ftpext.php	(revision 12993)
+++ class-wp-filesystem-ftpext.php	(working copy)
@@ -154,17 +154,20 @@
 				return false;
 		}
 
-		if ( ! $recursive || ! $this->is_dir($file) ) {
-			if ( ! function_exists('ftp_chmod') )
-				return @ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file));
-			return @ftp_chmod($this->link, $mode, $file);
+		if ( $recursive && $this->is_dir($file) ) {
+			//fetch contents of the directory
+			$filelist = $this->dirlist($file);
+			//make sure the directory isn't empty by testing for the presence of a returned array
+			if( is_array($filelist) ) {
+				foreach ( $filelist as $filename=>$metadata ) {
+					$this->chmod($file . '/' . $filename, $mode, $recursive);
+				}
+			}
 		}
-		//Is a directory, and we want recursive
-		$filelist = $this->dirlist($file);
-		foreach ( $filelist as $filename ) {
-			$this->chmod($file . '/' . $filename, $mode, $recursive);
-		}
-		return true;
+		//chmod the file or directory
+		if ( ! function_exists('ftp_chmod') )
+			return @ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file));
+		return @ftp_chmod($this->link, $mode, $file);
 	}
 	function chown($file, $owner, $recursive = false ) {
 		return false;
