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: http://core.svn.wordpress.org/trunk@23179 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2012-12-15 03:09:50 +00:00
parent 21963e265a
commit 39a19e1d76
1 changed files with 4 additions and 0 deletions

View File

@ -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 )