Make WordPress Core

Changeset 48919 for branches/5.5


Ignore:
Timestamp:
08/31/2020 06:28:54 PM (3 years ago)
Author:
desrosj
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.
Merges [48913] to the 5.5 branch.
Fixes #51182.

Location:
branches/5.5
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/5.5

  • branches/5.5/src/wp-admin/includes/class-theme-installer-skin.php

    r48677 r48919  
    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.