- Timestamp:
- 08/08/2022 12:39:51 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r52332 r53860 415 415 * 416 416 * @since 2.5.0 417 * @since 6.1.0 Rewrite using file size. 417 418 * 418 419 * @param string $file Path to file or directory. … … 420 421 */ 421 422 public function exists( $file ) { 422 $list = $this->ftp->nlist( $file ); 423 424 if ( empty( $list ) && $this->is_dir( $file ) ) { 425 return true; // File is an empty directory. 426 } 427 428 return ! empty( $list ); // Empty list = no file, so invert. 429 // Return $this->ftp->is_exists($file); has issues with ABOR+426 responses on the ncFTPd server. 423 if ( $this->is_dir( $file ) ) { 424 return true; 425 } 426 427 return is_numeric( $this->size( $file ) ); 430 428 } 431 429
Note: See TracChangeset
for help on using the changeset viewer.