Changeset 27336 for trunk/src/wp-admin/includes/update-core.php
- Timestamp:
- 03/01/2014 06:00:47 AM (12 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-admin/includes/update-core.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/update-core.php
r27195 r27336 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 … … 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 ( ! is_wp_error( $result ) ) { 816 if ( ! $r = $wp_filesystem->copy( $from . $distro . 'wp-includes/version.php', $to . 'wp-includes/version.php', true /* overwrite */ ) ) { 817 $wp_filesystem->delete( $from, true ); 818 $result = 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.' ), 'WTFwp-includes/version.php' ); 819 } 820 $wp_filesystem->chmod( $to . 'wp-includes/version.php', FS_CHMOD_FILE ); 821 } 822 813 823 // Check to make sure everything copied correctly, ignoring the contents of wp-content 814 824 $skip = array( 'wp-content' );
Note: See TracChangeset
for help on using the changeset viewer.