Changeset 6920
- Timestamp:
- 02/20/2008 12:15:55 AM (17 years ago)
- Location:
- trunk/wp-admin/includes
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/class-wp-filesystem-direct.php
r6919 r6920 3 3 class WP_Filesystem_Direct{ 4 4 var $permission = null; 5 var $errors = array(); 5 6 function WP_Filesystem_Direct($arg){ 7 $this->errors = new WP_Error(); 6 8 $this->permission = umask(); 7 9 } … … 189 191 function delete($file,$recursive=false){ 190 192 $file = str_replace('\\','/',$file); //for win32, occasional problems deleteing files otherwise 193 191 194 if( $this->is_file($file) ) 192 195 return @unlink($file); 193 if( !$recursive ) 196 197 if( !$recursive && $this->is_dir($file) ) 194 198 return @rmdir($file); 199 195 200 $filelist = $this->dirlist($file); 201 if( ! $filelist ) 202 return true; //No files exist, Say we've deleted them 196 203 197 204 $retval = true; -
trunk/wp-admin/includes/update.php
r6779 r6920 179 179 180 180 // If plugin is in its own directory, recursively delete the directory. 181 if ( '.' != $plugin_dir )181 if ( '.' != $plugin_dir && ABSPATH . PLUGINDIR != $plugin_dir ) 182 182 $wp_filesystem->delete($plugin_dir, true); 183 183
Note: See TracChangeset
for help on using the changeset viewer.