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
Built from https://develop.svn.wordpress.org/trunk@25274 git-svn-id: http://core.svn.wordpress.org/trunk@25240 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9fdfa7ef5c
commit
db6cf37f91
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue