- Timestamp:
- 04/14/2009 05:16:44 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-ftpsockets.php
r10919 r10930 187 187 function getchmod($file) { 188 188 $dir = $this->dirlist($file); 189 return $ this->getnumchmodfromh( $dir[basename($file)]['perms'] );189 return $dir[$file]['permsn']; 190 190 } 191 191 … … 282 282 283 283 function dirlist($path = '.', $incdot = false, $recursive = false ) { 284 285 if ( substr($path, -1) !== '/') { 286 $limit = basename($path); 287 $path = trailingslashit(dirname($path)); 284 if( $this->is_file($path) ) { 285 $limitFile = basename($path); 286 $path = dirname($path) . '/'; 288 287 } else { 289 $limit = false;288 $limitFile = false; 290 289 } 291 290 … … 293 292 if( ! $list ) 294 293 return false; 295 296 294 if( empty($list) ) 297 295 return array(); … … 299 297 $ret = array(); 300 298 foreach ( $list as $struc ) { 301 if ( $limit && $struc['name'] != $limit )302 continue;303 299 304 300 if ( 'd' == $struc['type'] ) {
Note: See TracChangeset
for help on using the changeset viewer.