WordPress.org

Make WordPress Core

Ticket #30815: 30815.patch

File 30815.patch, 558 bytes (added by ocean90, 7 years ago)
  • src/wp-admin/includes/class-wp-filesystem-ftpext.php

     
    289289         */
    290290        public function exists($file) {
    291291                $list = @ftp_nlist($this->link, $file);
     292
     293                if ( empty( $list ) && $this->is_dir( $file ) ) {
     294                        return true; // File is an empty directory.
     295                }
     296
    292297                return !empty($list); //empty list = no file, so invert.
    293298        }
    294299        /**