Make WordPress Core

Ticket #7861: 7861.3.diff

File 7861.3.diff, 1.1 KB (added by ShaneF, 16 years ago)
  • update-core.php

     
    177177
    178178        // Sanity check the unzipped distribution
    179179        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') ) {
    182182                $wp_filesystem->delete($from, true);
    183183                return new WP_Error('insane_distro', __('The update could not be unpacked') );
    184184        }
     
    202202        // Remove old files
    203203        foreach ( $_old_files as $old_file ) {
    204204                $old_file = $to . $old_file;
    205                 if ( !file_exists($old_file) )
     205                if ( !$wp_filesystem->exists($old_file) )
    206206                        continue;
    207207                $wp_filesystem->delete($old_file, true);
    208208        }