mirror of
git://develop.git.wordpress.org/
synced 2025-02-27 10:02:43 +01:00
When copying new bundled themes & plugins, bail early if the distro doesn't include the bundled item. This prevents us from creating an empty directory in the destination when the source doesn't exist. See #22856
git-svn-id: https://develop.svn.wordpress.org/trunk@23179 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
30ead1f605
commit
0c9c23936b
@ -701,6 +701,10 @@ function update_core($from, $to) {
|
||||
$directory = ('/' == $file[ strlen($file)-1 ]);
|
||||
list($type, $filename) = explode('/', $file, 2);
|
||||
|
||||
// Check to see if the bundled items exist before attempting to copy them
|
||||
if ( ! $wp_filesystem->exists( $from . $distro . 'wp-content/' . $file ) )
|
||||
continue;
|
||||
|
||||
if ( 'plugins' == $type )
|
||||
$dest = $wp_filesystem->wp_plugins_dir();
|
||||
elseif ( 'themes' == $type )
|
||||
|
Loading…
x
Reference in New Issue
Block a user