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