SSH2 Upgrade transport: Use ssh2_sftp_realpath() instead of shell commands to determine the current directory on the remote server. This should allow it to be used on chrooted SSH sessions.
See #32345 git-svn-id: https://develop.svn.wordpress.org/trunk@32726 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
995753d1d0
commit
671218ac1d
@ -193,7 +193,7 @@ class WP_Filesystem_SSH2 extends WP_Filesystem_Base {
|
||||
* @return bool
|
||||
*/
|
||||
public function cwd() {
|
||||
$cwd = $this->run_command('pwd');
|
||||
$cwd = ssh2_sftp_realpath( $this->sftp_link, '.' );
|
||||
if ( $cwd ) {
|
||||
$cwd = trailingslashit( trim( $cwd ) );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user