web/wp-admin/includes/class-wp-filesystem-ftpsockets.php
changeset 204 09a1c134465b
parent 194 32102edaa81b
--- a/web/wp-admin/includes/class-wp-filesystem-ftpsockets.php	Wed Dec 19 12:35:13 2012 -0800
+++ b/web/wp-admin/includes/class-wp-filesystem-ftpsockets.php	Wed Dec 19 17:46:52 2012 -0800
@@ -318,6 +318,10 @@
 					$struc['files'] = array();
 			}
 
+			// Replace symlinks formatted as "source -> target" with just the source name
+			if ( $struc['islink'] )
+				$struc['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $struc['name'] );
+
 			$ret[ $struc['name'] ] = $struc;
 		}
 		return $ret;