WordPress.org

Make WordPress Core

Changeset 9118


Ignore:
Timestamp:
10/10/08 10:40:04 (6 years ago)
Author:
azaozz
Message:

Check if the FTP account is rooted to the base of the WordPress install, props DD32, see #7861

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/class-wp-filesystem-base.php

    r9117 r9118  
    4949        if ( defined('FTP_BASE') && strpos($this->method, 'ftp') !== false ) 
    5050            return FTP_BASE; 
    51         return $this->find_folder(ABSPATH); 
     51        $folder = $this->find_folder(ABSPATH); 
     52        //Perhaps the FTP folder is rooted at the WordPress install, Check for wp-includes folder in root, Could have some false positives, but rare. 
     53        if ( ! $folder && $this->is_dir('/wp-includes') ) 
     54            $folder = '/'; 
     55        return $folder; 
    5256    } 
    5357    /** 
Note: See TracChangeset for help on using the changeset viewer.