Upgrades: When upgrading via FTP, use `LIST -a` to detect if a file exists.
`LIST` & `NLST` by default on some servers require the `-a` flag to view hidden files (ie. `.maintenance`) Although we could simply pass the `-a` flag to `NLST`, opting to use `LIST` which we use elsewhere should mean less chance of server incompatibilities. Props jcroucher. Fixes #28013. Built from https://develop.svn.wordpress.org/trunk@33648 git-svn-id: http://core.svn.wordpress.org/trunk@33615 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
25c5d372d3
commit
a32d83586e
|
@ -282,7 +282,7 @@ class WP_Filesystem_FTPext extends WP_Filesystem_Base {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function exists($file) {
|
public function exists($file) {
|
||||||
$list = @ftp_nlist($this->link, $file);
|
$list = @ftp_rawlist( $this->link, '-a ' . $file );
|
||||||
|
|
||||||
if ( empty( $list ) && $this->is_dir( $file ) ) {
|
if ( empty( $list ) && $this->is_dir( $file ) ) {
|
||||||
return true; // File is an empty directory.
|
return true; // File is an empty directory.
|
||||||
|
|
|
@ -290,7 +290,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
|
||||||
* @return bool
|
* @return bool
|
||||||
*/
|
*/
|
||||||
public function exists( $file ) {
|
public function exists( $file ) {
|
||||||
$list = $this->ftp->nlist( $file );
|
$list = $this->ftp->rawlist( $file, '-a' );
|
||||||
|
|
||||||
if ( empty( $list ) && $this->is_dir( $file ) ) {
|
if ( empty( $list ) && $this->is_dir( $file ) ) {
|
||||||
return true; // File is an empty directory.
|
return true; // File is an empty directory.
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-33646';
|
$wp_version = '4.4-alpha-33648';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
|
Loading…
Reference in New Issue