diff --git a/src/wp-admin/includes/class-wp-filesystem-base.php b/src/wp-admin/includes/class-wp-filesystem-base.php index 8080aef1a7..1ea44eb786 100644 --- a/src/wp-admin/includes/class-wp-filesystem-base.php +++ b/src/wp-admin/includes/class-wp-filesystem-base.php @@ -95,7 +95,7 @@ class WP_Filesystem_Base { public function 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') ) + if ( ! $folder && $this->is_dir( '/' . WPINC ) ) $folder = '/'; return $folder; }