Check if the FTP account is rooted to the base of the WordPress install, props DD32, see #7861
git-svn-id: http://svn.automattic.com/wordpress/trunk@9118 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
da61c3c1cb
commit
81797b2ca3
|
@ -48,7 +48,11 @@ class WP_Filesystem_Base {
|
|||
function abspath() {
|
||||
if ( defined('FTP_BASE') && strpos($this->method, 'ftp') !== false )
|
||||
return FTP_BASE;
|
||||
return $this->find_folder(ABSPATH);
|
||||
$folder = $this->find_folder(ABSPATH);
|
||||
//Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare.
|
||||
if ( ! $folder && $this->is_dir('/wp-includes') )
|
||||
$folder = '/';
|
||||
return $folder;
|
||||
}
|
||||
/**
|
||||
* Returns the path on the remote filesystem of WP_CONTENT_DIR
|
||||
|
|
Loading…
Reference in New Issue