Ticket #7861: 7861.3.diff
File 7861.3.diff, 1.1 KB (added by , 16 years ago) |
---|
-
update-core.php
177 177 178 178 // Sanity check the unzipped distribution 179 179 apply_filters('update_feedback', __('Verifying the unpacked files')); 180 if ( ! file_exists($from . '/wordpress/wp-settings.php') || !file_exists($from . '/wordpress/wp-admin/admin.php') ||181 ! file_exists($from . '/wordpress/wp-includes/functions.php') ) {180 if ( !$wp_filesystem->exists($from . '/wordpress/wp-settings.php') || !$wp_filesystem->exists($from . '/wordpress/wp-admin/admin.php') || 181 !$wp_filesystem->exists($from . '/wordpress/wp-includes/functions.php') ) { 182 182 $wp_filesystem->delete($from, true); 183 183 return new WP_Error('insane_distro', __('The update could not be unpacked') ); 184 184 } … … 202 202 // Remove old files 203 203 foreach ( $_old_files as $old_file ) { 204 204 $old_file = $to . $old_file; 205 if ( ! file_exists($old_file) )205 if ( !$wp_filesystem->exists($old_file) ) 206 206 continue; 207 207 $wp_filesystem->delete($old_file, true); 208 208 }