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


git-svn-id: https://develop.svn.wordpress.org/trunk@31863 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2015-03-23 04:39:56 +00:00
parent 9eb9342a54
commit f0849242d3
1 changed files with 2 additions and 2 deletions

View File

@ -263,8 +263,8 @@ class WP_Upgrader {
$wp_filesystem->delete($upgrade_folder . $file['name'], true);
}
//We need a working directory
$working_dir = $upgrade_folder . basename($package, '.zip');
// We need a working directory - Strip off any .tmp or .zip suffixes
$working_dir = $upgrade_folder . basename( basename( $package, '.tmp' ), '.zip' );
// Clean up working directory
if ( $wp_filesystem->is_dir($working_dir) )