Auto update fixes from DD32. see #5586

git-svn-id: https://develop.svn.wordpress.org/trunk@7238 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2008-03-11 16:37:44 +00:00
parent e5ce1add47
commit 40da1d6412
6 changed files with 36 additions and 32 deletions
+2 -5
View File
@@ -231,7 +231,7 @@ function unzip_file($file, $to) {
// Is the archive valid?
if ( false == ($archive_files = $archive->extract(PCLZIP_OPT_EXTRACT_AS_STRING)) )
return new WP_Error('incompatible_archive', __('Incompatible archive'), $archive->error_string);
return new WP_Error('incompatible_archive', __('Incompatible archive'), $archive->errorInfo(true));
if ( 0 == count($archive_files) )
return new WP_Error('empty_archive', __('Empty archive'));
@@ -240,12 +240,9 @@ function unzip_file($file, $to) {
$path = explode('/', $to);
$tmppath = '';
for ( $j = 0; $j < count($path) - 1; $j++ ) {
$prevpath = $tmppath;
$tmppath .= $path[$j] . '/';
if ( ! $fs->is_dir($tmppath) ) {
//$fs->setDefaultPermissions( $fs->getchmod($tmppath) );
if ( ! $fs->is_dir($tmppath) )
$fs->mkdir($tmppath, 0755);
}
}
foreach ($archive_files as $file) {