Wordpress 3.5
[autoinstalls/wordpress.git] / wp-admin / includes / class-wp-filesystem-ftpsockets.php
index 2e9fbd69970f5f0ed1500ed7880b1a06477db887..1c931e19281c5a600c63e294d9b0cf524f3f9da7 100644 (file)
@@ -318,6 +318,10 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
                                        $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;