WP_Filesystem_FTPext::dirlist() doesn't handle symbolic links properly
|Reported by:||Oded||Owned by:||dd32|
When listing files using WP_Filesystem_FTPext::dirlist() and encountering symbolic linux on a Unix FTP server, dirlist() returns the "file name" as a symbolic link textual description such as shown by "ls -l", e.g. "linkname -> /absolute/path/to/file".
It stands to reason as this is the expected format of the FTP LIST command, but users of dirlist() are getting a structure with full details and expect the value associated with the "name" key to contain only the name of the file (or the name of the link in this case).
WP_Filesystem_FTPext should parse links properly in parselisting() and hide the extraneous data so as not to confuse users of dirlist() that expect specific file names, when the expected file name is a symbolic link.