Changeset 15059
- Timestamp:
- 05/29/2010 06:21:30 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/update-core.php
r15057 r15059 291 291 // Sanity check the unzipped distribution 292 292 apply_filters('update_feedback', __('Verifying the unpacked files…')); 293 if ( !$wp_filesystem->exists($from . '/wordpress/wp-settings.php') || !$wp_filesystem->exists($from . '/wordpress/wp-admin/admin.php') || 294 !$wp_filesystem->exists($from . '/wordpress/wp-includes/functions.php') ) { 293 $distro = ''; 294 $roots = array( '/wordpress', '/wordpress-mu' ); 295 foreach( $roots as $root ) { 296 if ( $wp_filesystem->exists($from . $root . '/wp-settings.php') && $wp_filesystem->exists($from . $root . '/wp-admin/admin.php') && 297 !$wp_filesystem->exists($from . $root . '/wp-includes/functions.php') ) { 298 $distro = $root; 299 break; 300 } 301 } 302 if ( !$distro ) { 295 303 $wp_filesystem->delete($from, true); 296 304 return new WP_Error('insane_distro', __('The update could not be unpacked') ); … … 306 314 307 315 // Copy new versions of WP files into place. 308 $result = copy_dir($from . '/wordpress', $to);316 $result = copy_dir($from . $distro, $to); 309 317 if ( is_wp_error($result) ) { 310 318 $wp_filesystem->delete($maintenance_file);
Note: See TracChangeset
for help on using the changeset viewer.