mirror of
https://github.com/WordPress/WordPress.git
synced 2024-11-05 02:10:45 +01:00
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 Built from https://develop.svn.wordpress.org/trunk@31863 git-svn-id: http://core.svn.wordpress.org/trunk@31842 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
cc903c3422
commit
3dc53770b7
@ -263,8 +263,8 @@ class WP_Upgrader {
|
|||||||
$wp_filesystem->delete($upgrade_folder . $file['name'], true);
|
$wp_filesystem->delete($upgrade_folder . $file['name'], true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//We need a working directory
|
// We need a working directory - Strip off any .tmp or .zip suffixes
|
||||||
$working_dir = $upgrade_folder . basename($package, '.zip');
|
$working_dir = $upgrade_folder . basename( basename( $package, '.tmp' ), '.zip' );
|
||||||
|
|
||||||
// Clean up working directory
|
// Clean up working directory
|
||||||
if ( $wp_filesystem->is_dir($working_dir) )
|
if ( $wp_filesystem->is_dir($working_dir) )
|
||||||
|
Loading…
Reference in New Issue
Block a user