Index: src/wp-includes/plugin.php
===================================================================
--- src/wp-includes/plugin.php	(revision 37329)
+++ src/wp-includes/plugin.php	(working copy)
@@ -675,13 +675,15 @@
 function plugin_basename( $file ) {
 	global $wp_plugin_paths;
 
+	// $wp_plugin_paths contains normalized paths.
+	$file = wp_normalize_path( $file );
+
 	foreach ( $wp_plugin_paths as $dir => $realdir ) {
 		if ( strpos( $file, $realdir ) === 0 ) {
 			$file = $dir . substr( $file, strlen( $realdir ) );
 		}
 	}
 
-	$file = wp_normalize_path( $file );
 	$plugin_dir = wp_normalize_path( WP_PLUGIN_DIR );
 	$mu_plugin_dir = wp_normalize_path( WPMU_PLUGIN_DIR );
 
Index: tests/phpunit/tests/functions/pluginBasename.php
===================================================================
--- tests/phpunit/tests/functions/pluginBasename.php	(revision 0)
+++ tests/phpunit/tests/functions/pluginBasename.php	(working copy)
@@ -0,0 +1,27 @@
+<?php
+
+/**
+ * Tests for plugin_basename()
+ *
+ * @group functions.php
+ * @group plugins
+ */
+class Tests_Plugin_Basename extends WP_UnitTestCase {
+
+	/**
+	 * @ticket 29154
+	 */
+	function test_should_return_correct_basename_for_symlinked_plugins() {
+		global $wp_plugin_paths;
+
+		$old_wp_plugin_paths = $wp_plugin_paths;
+
+		$wp_plugin_paths[ WP_PLUGIN_DIR . '/a-symlinked-plugin' ] = 'C:/www/path/plugins/a-plugin';
+
+		$basename = plugin_basename( 'c:\www\path\plugins\a-plugin\plugin.php' );
+
+		$wp_plugin_paths = $old_wp_plugin_paths;
+
+		$this->assertSame( 'a-symlinked-plugin/plugin.php', $basename );
+	}
+}
