Ticket #30815: 30815.2.patch
| File 30815.2.patch, 1.2 KB (added by , 11 years ago) |
|---|
-
src/wp-admin/includes/class-wp-filesystem-ftpext.php
275 275 */ 276 276 public function exists($file) { 277 277 $list = @ftp_nlist($this->link, $file); 278 279 if ( empty( $list ) && $this->is_dir( $file ) ) { 280 return true; // File is an empty directory. 281 } 282 278 283 return !empty($list); //empty list = no file, so invert. 279 284 } 280 285 /** -
src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
274 274 */ 275 275 public function exists( $file ) { 276 276 $list = $this->ftp->nlist( $file ); 277 278 if ( empty( $list ) && $this->is_dir( $file ) ) { 279 return true; // File is an empty directory. 280 } 281 277 282 return !empty( $list ); //empty list = no file, so invert. 278 283 // Return $this->ftp->is_exists($file); has issues with ABOR+426 responses on the ncFTPd server. 279 284 }