Make WordPress Core

Changeset 48913 for trunk


Ignore:
Timestamp:
08/31/2020 05:09:35 PM (4 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-theme-installer-skin.php

    r48677 r48913  
    207207
    208208        foreach ( $all_themes as $theme ) {
    209             if ( rtrim( $theme->get_stylesheet_directory(), '/' ) !== $folder ) {
     209            $stylesheet_dir = wp_normalize_path( $theme->get_stylesheet_directory() );
     210
     211            if ( rtrim( $stylesheet_dir, '/' ) !== $folder ) {
    210212                continue;
    211213            }
Note: See TracChangeset for help on using the changeset viewer.