diff --git a/wp-admin/includes/file.php b/wp-admin/includes/file.php index e527b2eb97..5abb4cfba5 100644 --- a/wp-admin/includes/file.php +++ b/wp-admin/includes/file.php @@ -643,10 +643,13 @@ function _unzip_file_ziparchive($file, $to, $needed_dirs = array() ) { $uncompressed_size += $info['size']; - if ( '/' == substr($info['name'], -1) ) // directory - $needed_dirs[] = $to . untrailingslashit($info['name']); - else - $needed_dirs[] = $to . untrailingslashit(dirname($info['name'])); + if ( '/' === substr( $info['name'], -1 ) ) { + // Directory. + $needed_dirs[] = $to . untrailingslashit( $info['name'] ); + } elseif ( '.' !== $dirname = dirname( $info['name'] ) ) { + // Path to a file. + $needed_dirs[] = $to . untrailingslashit( $dirname ); + } } /* diff --git a/wp-includes/version.php b/wp-includes/version.php index 5a29078b40..a8b95baf3b 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.6-alpha-37419'; +$wp_version = '4.6-alpha-37421'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.