Filesystem: Fix getchmod() for direct and ssh2 transports, for directories.
props DavidAnderson. fixes #26598. Built from https://develop.svn.wordpress.org/trunk@27566 git-svn-id: http://core.svn.wordpress.org/trunk@27409 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -230,7 +230,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
}
|
||||
|
||||
function getchmod($file) {
|
||||
return substr(decoct(@fileperms( 'ssh2.sftp://' . $this->sftp_link . '/' . ltrim($file, '/') )),3);
|
||||
return substr( decoct( @fileperms( 'ssh2.sftp://' . $this->sftp_link . '/' . ltrim( $file, '/' ) ) ), -3 );
|
||||
}
|
||||
|
||||
function group($file) {
|
||||
|
||||
Reference in New Issue
Block a user