Standardise return values in WP_Filesystem::dirlist(), ::chmod() and ::exists()

git-svn-id: https://develop.svn.wordpress.org/trunk@12999 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse
2010-02-07 01:59:30 +00:00
parent c6aa08558a
commit eff9f9e25b
2 changed files with 12 additions and 11 deletions

View File

@@ -224,7 +224,11 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
}
function is_file($file) {
return $this->is_dir($file) ? false : true;
if ( $this->is_dir($file) )
return false;
if ( $this->exists($file) )
return true;
return false;
}
function is_dir($path) {
@@ -288,7 +292,7 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
}
$list = $this->ftp->dirlist($path);
if ( ! $list )
if ( empty($list) && !$this->exists($path) )
return false;
$ret = array();