Fix bad bracketing in unzip_file()

git-svn-id: http://svn.automattic.com/wordpress/trunk@8580 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-08-07 19:15:04 +00:00
parent e6971c04f1
commit 57e2267904
1 changed files with 2 additions and 1 deletions

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:
if ( ! $file['folder'] )
if ( ! $file['folder'] ) {
if ( !$fs->put_contents( $to . $file['filename'], $file['content']) )
return new WP_Error('copy_failed', __('Could not copy file'), $to . $file['filename']);
$fs->chmod($to . $file['filename'], 0644);
}
}
return true;