From a47cdd86cb87d15d13e8fa21b3c72372cda49d6d Mon Sep 17 00:00:00 2001 From: dd32 Date: Sun, 28 Mar 2010 01:07:03 +0000 Subject: [PATCH] Attempt to work around Mac FTP Server security implications of using '-a' in FTP. Props eoinomurchu. See #12232 git-svn-id: http://svn.automattic.com/wordpress/trunk@13850 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-wp-filesystem-ftpext.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-filesystem-ftpext.php b/wp-admin/includes/class-wp-filesystem-ftpext.php index 4dff80b3e4..51bee4c6b4 100644 --- a/wp-admin/includes/class-wp-filesystem-ftpext.php +++ b/wp-admin/includes/class-wp-filesystem-ftpext.php @@ -332,7 +332,10 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base { $limit_file = false; } - $list = @ftp_rawlist($this->link, '-a ' . $path, false); + $pwd = @ftp_pwd(); + $chdir = @ftp_chdir($this->link, $path); + $list = @ftp_rawlist($this->link, '-a', false); + @ftp_chdir($this->link, $pwd); if ( empty($list) ) // Empty array = non-existent folder (real folder will show . at least) return false;