WP Filesystem: Correctly parse the permissions field in the directory listings, and actually set it in FTP environments

Props mnelson4 for initial patch.
Fixes #29548


git-svn-id: https://develop.svn.wordpress.org/trunk@32923 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2015-06-24 04:48:18 +00:00
parent bdace7c8b5
commit fc52d9cbb1
3 changed files with 17 additions and 2 deletions
@@ -449,6 +449,9 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
if ( $struc['islink'] )
$struc['name'] = preg_replace( '/(\s*->\s*.*)$/', '', $struc['name'] );
// Add the Octal representation of the file permissions
$struc['permsn'] = $this->getnumchmodfromh( $struc['perms'] );
$ret[ $struc['name'] ] = $struc;
}