Index: wp-admin/includes/class-wp-upgrader.php
===================================================================
--- wp-admin/includes/class-wp-upgrader.php	(revision 11817)
+++ wp-admin/includes/class-wp-upgrader.php	(working copy)
@@ -81,20 +81,28 @@
 			return new WP_Error('fs_error', $this->strings['fs_error'], $wp_filesystem->errors);
 
 		foreach ( (array)$directories as $dir ) {
-			if ( ABSPATH == $dir && ! $wp_filesystem->abspath() )
-				return new WP_Error('fs_no_root_dir', $this->strings['fs_no_root_dir']);
-
-			elseif ( WP_CONTENT_DIR == $dir && ! $wp_filesystem->wp_content_dir() )
-				return new WP_Error('fs_no_content_dir', $this->strings['fs_no_content_dir']);
-
-			elseif ( WP_PLUGIN_DIR == $dir && ! $wp_filesystem->wp_plugins_dir() )
-				return new WP_Error('fs_no_plugins_dir', $this->strings['fs_no_plugins_dir']);
-
-			elseif ( WP_CONTENT_DIR . '/themes' == $dir && ! $wp_filesystem->find_folder(WP_CONTENT_DIR . '/themes') )
-				return new WP_Error('fs_no_themes_dir', $this->strings['fs_no_themes_dir']);
-
-			elseif ( ! $wp_filesystem->find_folder($dir) )
-				return new WP_Error('fs_no_folder', sprintf($strings['fs_no_folder'], $dir));
+			switch ( $dir ) {
+				case ABSPATH:
+					if ( ! $wp_filesystem->abspath() )
+						return new WP_Error('fs_no_root_dir', $this->strings['fs_no_root_dir']);
+					break;
+				case WP_CONTENT_DIR:
+					if ( ! $wp_filesystem->wp_content_dir() )
+						return new WP_Error('fs_no_content_dir', $this->strings['fs_no_content_dir']);
+					break;
+				case WP_PLUGIN_DIR:
+					if ( ! $wp_filesystem->wp_plugins_dir() )
+						return new WP_Error('fs_no_plugins_dir', $this->strings['fs_no_plugins_dir']);
+					break;
+				case WP_CONTENT_DIR . '/themes':
+					if ( ! $wp_filesystem->find_folder(WP_CONTENT_DIR . '/themes') )
+						return new WP_Error('fs_no_themes_dir', $this->strings['fs_no_themes_dir']);
+					break;
+				default:
+					if ( ! $wp_filesystem->find_folder($dir) )
+						return new WP_Error('fs_no_folder', sprintf($this->strings['fs_no_folder'], $dir));
+					break;
+			}
 		}
 		return true;
 	} //end fs_connect();
