Make WordPress Core


Ignore:
Timestamp:
09/09/2008 03:24:05 AM (16 years ago)
Author:
azaozz
Message:

SSH2 filesystem improvements, props ShaneF, see #7690

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/update.php

    r8691 r8852  
    239239
    240240    $working_dir = $content_dir . 'upgrade/core';
    241 
    242241    // Clean up working directory
    243     if ( $wp_filesystem->is_dir($working_dir) )
    244         $wp_filesystem->delete($working_dir, true);
    245 
    246     apply_filters('update_feedback', __('Unpacking the update'));
     242    if ( $wp_filesystem->is_dir($working_dir) ) {
     243        $wp_filesystem->delete($working_dir, true);
     244    }
     245
     246    apply_filters('update_feedback', __('Unpacking the core update'));
    247247    // Unzip package to working directory
    248248    $result = unzip_file($download_file, $working_dir);
    249 
    250249    // Once extracted, delete the package
    251250    unlink($download_file);
    252 
     251   
    253252    if ( is_wp_error($result) ) {
    254253        $wp_filesystem->delete($working_dir, true);
    255254        return $result;
    256255    }
    257 
     256   
    258257    // Copy update-core.php from the new version into place.
    259258    if ( !$wp_filesystem->copy($working_dir . '/wordpress/wp-admin/includes/update-core.php', $wp_dir . 'wp-admin/includes/update-core.php', true) ) {
Note: See TracChangeset for help on using the changeset viewer.