From 671218ac1d4bf1c81a87c68308fb5fb6befce034 Mon Sep 17 00:00:00 2001 From: Dion Hulse Date: Fri, 12 Jun 2015 06:30:58 +0000 Subject: [PATCH] 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 --- src/wp-admin/includes/class-wp-filesystem-ssh2.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/includes/class-wp-filesystem-ssh2.php b/src/wp-admin/includes/class-wp-filesystem-ssh2.php index b8b541ed25..e446656ec1 100644 --- a/src/wp-admin/includes/class-wp-filesystem-ssh2.php +++ b/src/wp-admin/includes/class-wp-filesystem-ssh2.php @@ -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 ) ); }