Index: wp-includes/class-wp-theme.php
===================================================================
--- wp-includes/class-wp-theme.php	(revision 23178)
+++ wp-includes/class-wp-theme.php	(working copy)
@@ -206,6 +206,8 @@
 			$this->headers['Name'] = $this->stylesheet;
 			if ( ! file_exists( $this->theme_root . '/' . $this->stylesheet ) )
 				$this->errors = new WP_Error( 'theme_not_found', __( 'The theme directory does not exist.' ) );
+			elseif ( ! glob( $this->theme_root . '/' . $this->stylesheet . '/*' ) )
+				$this->errors = new WP_Error( 'theme_no_files', __( 'The theme directory does not contain a theme.' ) );
 			else
 				$this->errors = new WP_Error( 'theme_no_stylesheet', __( 'Stylesheet is missing.' ) );
 			$this->template = $this->stylesheet;
@@ -441,7 +443,8 @@
 	 * Whether the theme exists.
 	 *
 	 * A theme with errors exists. A theme with the error of 'theme_not_found',
-	 * meaning that the theme's directory was not found, does not exist.
+	 * or 'theme_no_files' meaning that the theme's directory was not found, or
+	 * doesn't contain any files, does not exist.
 	 *
 	 * @since 3.4.0
 	 * @access public
@@ -449,7 +452,7 @@
 	 * @return bool Whether the theme exists.
 	 */
 	public function exists() {
-		return ! ( $this->errors() && in_array( 'theme_not_found', $this->errors()->get_error_codes() ) );
+		return ! ( $this->errors() && array_intersect( array( 'theme_not_found', 'theme_no_files' ), $this->errors()->get_error_codes() ) );
 	}
 
 	/**
