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

git-svn-id: https://develop.svn.wordpress.org/trunk@25274 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2013-09-06 08:28:59 +00:00
parent 37d92f4851
commit d9c5265303
1 changed files with 4 additions and 2 deletions

View File

@ -219,8 +219,10 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
return $this->ftp->mdel($file);
}
function exists($file) {
return $this->ftp->is_exists($file);
function exists( $file ) {
$list = $this->ftp->nlist( $file );
return !empty( $list ); //empty list = no file, so invert.
// return $this->ftp->is_exists($file); has issues with ABOR+426 responses on the ncFTPd server
}
function is_file($file) {