Make WordPress Core

Changeset 33648


Ignore:
Timestamp:
08/19/2015 12:37:56 PM (11 years ago)
Author:
dd32
Message:

Upgrades: When upgrading via FTP, use LIST -a to detect if a file exists.
LIST & NLST by default on some servers require the -a flag to view hidden files (ie. .maintenance)
Although we could simply pass the -a flag to NLST, opting to use LIST which we use elsewhere should mean less chance of server incompatibilities.

Props jcroucher.
Fixes #28013.

Location:
trunk/src/wp-admin/includes
Files:
2 edited

Legend:

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

    r32923 r33648  
    283283         */
    284284        public function exists($file) {
    285                 $list = @ftp_nlist($this->link, $file);
     285                $list = @ftp_rawlist( $this->link, '-a ' . $file );
    286286
    287287                if ( empty( $list ) && $this->is_dir( $file ) ) {
  • trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php

    r33639 r33648  
    291291         */
    292292        public function exists( $file ) {
    293                 $list = $this->ftp->nlist( $file );
     293                $list = $this->ftp->rawlist( $file, '-a' );
    294294
    295295                if ( empty( $list ) && $this->is_dir( $file ) ) {
Note: See TracChangeset for help on using the changeset viewer.