Make WordPress Core

Changeset 25274


Ignore:
Timestamp:
09/06/2013 08:28:59 AM (11 years ago)
Author:
dd32
Message:

WP_Filesystem: FTP Sockets: Avoid using the file_exists() / is_exists() / exists() PemFTP functionality as it's buggy on ncFTPd servers, switching to listing the file instead which is what we use for the FTP Extension transport. Fixes #14049

File:
1 edited

Legend:

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

    r23191 r25274  
    220220    }
    221221
    222     function exists($file) {
    223         return $this->ftp->is_exists($file);
     222    function exists( $file ) {
     223        $list = $this->ftp->nlist( $file );
     224        return !empty( $list ); //empty list = no file, so invert.
     225        // return $this->ftp->is_exists($file); has issues with ABOR+426 responses on the ncFTPd server
    224226    }
    225227
Note: See TracChangeset for help on using the changeset viewer.