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:
parent
9eb9342a54
commit
f0849242d3
@ -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) )
|
||||
|
Loading…
x
Reference in New Issue
Block a user