Ticket #25860: 25860.diff
| File 25860.diff, 1.5 KB (added by , 12 years ago) |
|---|
-
src/wp-admin/includes/update-core.php
748 748 apply_filters( 'update_feedback', __( 'Preparing to install the latest version…' ) ); 749 749 750 750 // Don't copy wp-content, we'll deal with that below 751 $skip = array( 'wp-content' ); 751 // We also copy version.php last so failed updates report their old version 752 $skip = array( 'wp-content', 'wp-includes/version.php' ); 752 753 $check_is_writable = array(); 753 754 754 755 // Check to see which files don't really need updating - only available for 3.7 and higher … … 810 811 if ( is_wp_error( $result ) ) 811 812 $result = new WP_Error( $result->get_error_code(), $result->get_error_message(), substr( $result->get_error_data(), strlen( $to ) ) ); 812 813 814 // Since we know the core files have copied over, we can now copy the version file 815 if ( ! $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php' ) ) { 816 $wp_filesystem->delete( $from, true ); 817 return new WP_Error( 'copy_failed_for_version_file', __( 'The update cannot be installed because we will be unable to copy some files. This is usually due to inconsistent file permissions.' ), 'wp-includes/version.php' ); 818 } 819 $wp_filesystem->chmod( $to . 'wp-includes/version.php', FS_CHMOD_FILE ); 820 813 821 // Check to make sure everything copied correctly, ignoring the contents of wp-content 814 822 $skip = array( 'wp-content' ); 815 823 $failed = array();