Themes not within a subdirectory of the zip need to have the working directory Trailingslashed. See #14999

git-svn-id: http://svn.automattic.com/wordpress/trunk@19057 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2011-10-25 04:25:52 +00:00
parent b75f3e8f07
commit 68037f4ac1
1 changed files with 2 additions and 1 deletions

View File

@ -194,7 +194,8 @@ class WP_Upgrader {
$source = trailingslashit($source) . trailingslashit($source_files[0]); $source = trailingslashit($source) . trailingslashit($source_files[0]);
elseif ( count($source_files) == 0 ) elseif ( count($source_files) == 0 )
return new WP_Error('incompatible_archive', $this->strings['incompatible_archive']); //There are no files? return new WP_Error('incompatible_archive', $this->strings['incompatible_archive']); //There are no files?
//else //Its only a single file, The upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename. else //Its only a single file, The upgrader will use the foldername of this file as the destination folder. foldername is based on zip filename.
$source = trailingslashit($source);
//Hook ability to change the source file location.. //Hook ability to change the source file location..
$source = apply_filters('upgrader_source_selection', $source, $remote_source, $this); $source = apply_filters('upgrader_source_selection', $source, $remote_source, $this);