WP_Filesystem: Change WP_Filesystem_FTPext::exists() and WP_Filesystem_ftpsockets::exists() to return true for empty directories.

Both methods are using *nlist() which returns a list of files in a given directory or the file itself for a given file. If the result was an empty list we assumed that the file doesn't exists. This includes also cases where $file is actually an empty directory. To prevent this we now check if $file is a directory before returning the result of an empty list.
Other filesystem methods are using `file_exists()` which already checks whether a file or directory exists.

fixes #30815.
Built from https://develop.svn.wordpress.org/trunk@31815


git-svn-id: http://core.svn.wordpress.org/trunk@31797 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dominik Schilling
2015-03-18 19:22:27 +00:00
parent 80faa524fe
commit 9b79c36713
3 changed files with 11 additions and 1 deletions

View File

@@ -4,7 +4,7 @@
*
* @global string $wp_version
*/
$wp_version = '4.2-beta1-31814';
$wp_version = '4.2-beta1-31815';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.