diff --git a/src/wp-admin/includes/class-wp-upgrader.php b/src/wp-admin/includes/class-wp-upgrader.php index 88c6d5d604..c1d65972c8 100644 --- a/src/wp-admin/includes/class-wp-upgrader.php +++ b/src/wp-admin/includes/class-wp-upgrader.php @@ -594,35 +594,17 @@ class WP_Upgrader { } // Copy new version of item into place. - if ( class_exists( 'Rollback_Update_Failure\WP_Upgrader' ) - && function_exists( '\Rollback_Update_Failure\move_dir' ) - ) { - /* - * If the {@link https://wordpress.org/plugins/rollback-update-failure/ Rollback Update Failure} - * feature plugin is installed, use the move_dir() function from there for better performance. - * Instead of copying a directory from one location to another, it uses the rename() PHP function - * to speed up the process. If the renaming failed, it falls back to copy_dir(). - * - * This condition aims to facilitate broader testing of the Rollbacks (temp backups) feature project. - * It is temporary, until the plugin is merged into core. - */ - $result = \Rollback_Update_Failure\move_dir( $source, $remote_destination ); - } else { - $result = copy_dir( $source, $remote_destination ); - } - - if ( is_wp_error( $result ) ) { - if ( $args['clear_working'] ) { - $wp_filesystem->delete( $remote_source, true ); - } - return $result; - } + $result = copy_dir( $source, $remote_destination ); // Clear the working folder? if ( $args['clear_working'] ) { $wp_filesystem->delete( $remote_source, true ); } + if ( is_wp_error( $result ) ) { + return $result; + } + $destination_name = basename( str_replace( $local_destination, '', $destination ) ); if ( '.' === $destination_name ) { $destination_name = '';