From 68037f4ac18e7d2aead2a739948ccad394b3971b Mon Sep 17 00:00:00 2001 From: dd32 Date: Tue, 25 Oct 2011 04:25:52 +0000 Subject: [PATCH] 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 --- wp-admin/includes/class-wp-upgrader.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/includes/class-wp-upgrader.php b/wp-admin/includes/class-wp-upgrader.php index 37148f1348..0a4e495144 100644 --- a/wp-admin/includes/class-wp-upgrader.php +++ b/wp-admin/includes/class-wp-upgrader.php @@ -194,7 +194,8 @@ class WP_Upgrader { $source = trailingslashit($source) . trailingslashit($source_files[0]); elseif ( count($source_files) == 0 ) 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.. $source = apply_filters('upgrader_source_selection', $source, $remote_source, $this);