From d4d3e23ad0b339332cf5ac065ec497094710d82b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Mon, 31 Aug 2020 17:11:04 +0000 Subject: [PATCH] Themes: Normalize the installed theme path in `Theme_Installer_Skin::do_overwrite()` before comparing with the uploaded theme. This ensures that the data for the currently installed theme is picked up properly when uploading a theme update on Windows. Follow-up to [48390]. Props bobbingwide, wpamitkumar, mukesh27. Fixes #51182. Built from https://develop.svn.wordpress.org/trunk@48913 git-svn-id: http://core.svn.wordpress.org/trunk@48675 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/class-theme-installer-skin.php | 4 +++- wp-includes/version.php | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/class-theme-installer-skin.php b/wp-admin/includes/class-theme-installer-skin.php index 16e99332a6..c6d0900abe 100644 --- a/wp-admin/includes/class-theme-installer-skin.php +++ b/wp-admin/includes/class-theme-installer-skin.php @@ -206,7 +206,9 @@ class Theme_Installer_Skin extends WP_Upgrader_Skin { $all_themes = wp_get_themes( array( 'errors' => null ) ); foreach ( $all_themes as $theme ) { - if ( rtrim( $theme->get_stylesheet_directory(), '/' ) !== $folder ) { + $stylesheet_dir = wp_normalize_path( $theme->get_stylesheet_directory() ); + + if ( rtrim( $stylesheet_dir, '/' ) !== $folder ) { continue; } diff --git a/wp-includes/version.php b/wp-includes/version.php index fe385288bd..121cae7d6d 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.6-alpha-48912'; +$wp_version = '5.6-alpha-48913'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.