Changeset 12998 for trunk/wp-admin/includes/class-wp-filesystem-direct.php
- Timestamp:
- 02/07/2010 01:31:40 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-direct.php
r12997 r12998 117 117 */ 118 118 function chmod($file, $mode = false, $recursive = false) { 119 if ( ! $this->exists($file) )120 return false;121 122 119 if ( ! $mode ) { 123 120 if ( $this->is_file($file) ) … … 129 126 } 130 127 131 if ( ! $recursive ) 132 return @chmod($file, $mode); 133 if ( ! $this->is_dir($file) ) 128 if ( ! $recursive || ! $this->is_dir($file) ) 134 129 return @chmod($file, $mode); 135 130 //Is a directory, and we want recursive … … 299 294 300 295 function rmdir($path, $recursive = false) { 301 //Currently unused and untested, Use delete() instead. 302 if ( ! $recursive ) 303 return @rmdir($path); 304 //recursive: 305 $filelist = $this->dirlist($path); 306 foreach ($filelist as $filename => $det) { 307 if ( '/' == substr($filename, -1, 1) ) 308 $this->rmdir($path . '/' . $filename, $recursive); 309 @rmdir($filename); 310 } 311 return @rmdir($path); 296 return $this->delete($path, $recursive); 312 297 } 313 298
Note: See TracChangeset
for help on using the changeset viewer.