Fix bad bracketing in unzip_file()

git-svn-id: https://develop.svn.wordpress.org/trunk@8580 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-08-07 19:15:04 +00:00
parent eb3daa5799
commit 80a4ec8e37

View File

@ -384,10 +384,11 @@ function unzip_file($file, $to) {
} }
// We've made sure the folders are there, so let's extract the file now: // We've made sure the folders are there, so let's extract the file now:
if ( ! $file['folder'] ) if ( ! $file['folder'] ) {
if ( !$fs->put_contents( $to . $file['filename'], $file['content']) ) if ( !$fs->put_contents( $to . $file['filename'], $file['content']) )
return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']); return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']);
$fs->chmod($to . $file['filename'], 0644); $fs->chmod($to . $file['filename'], 0644);
}
} }
return true; return true;