diff --git a/src/wp-admin/includes/class-theme-installer-skin.php b/src/wp-admin/includes/class-theme-installer-skin.php index 16e99332a6..c6d0900abe 100644 --- a/src/wp-admin/includes/class-theme-installer-skin.php +++ b/src/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; }