WordPress.org

Make WordPress Core

Changeset 31863


Ignore:
Timestamp:
03/23/2015 04:39:56 AM (6 years ago)
Author:
dd32
Message:

Upgrader: When creating a temporary working directory, strip off .tmp as well as .zip incase we end up using that directory as the items main directory.
Fixes #30945

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-upgrader.php

    r31844 r31863  
    264264        }
    265265
    266         //We need a working directory
    267         $working_dir = $upgrade_folder . basename($package, '.zip');
     266        // We need a working directory - Strip off any .tmp or .zip suffixes
     267        $working_dir = $upgrade_folder . basename( basename( $package, '.tmp' ), '.zip' );
    268268
    269269        // Clean up working directory
Note: See TracChangeset for help on using the changeset viewer.