summaryrefslogtreecommitdiff
path: root/ext/zip/lib/zip_close.c
diff options
context:
space:
mode:
authorAnatoliy Belsky <ab@php.net>2012-06-05 22:11:07 +0200
committerAnatoliy Belsky <ab@php.net>2012-06-07 21:01:31 +0200
commitf4a44f18b8fe5d23a11d12b048d4effce283379f (patch)
tree35850a34200dc4be272f16fa486f83a4f25194dd /ext/zip/lib/zip_close.c
parenta39bcfc5ee3931c25bdbc5dc2409e6d9dd98ff52 (diff)
downloadphp-git-f4a44f18b8fe5d23a11d12b048d4effce283379f.tar.gz
rechecked the merged libzip, took also the indents from the original to
avoid confusion next time
Diffstat (limited to 'ext/zip/lib/zip_close.c')
-rw-r--r--ext/zip/lib/zip_close.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/ext/zip/lib/zip_close.c b/ext/zip/lib/zip_close.c
index b0e3c75c1c..362f92d749 100644
--- a/ext/zip/lib/zip_close.c
+++ b/ext/zip/lib/zip_close.c
@@ -316,22 +316,22 @@ zip_close(struct zip *za)
free(temp);
return -1;
}
-
- if (za->zp) {
- fclose(za->zp);
- za->zp = NULL;
- reopen_on_error = 1;
+
+ if (za->zp) {
+ fclose(za->zp);
+ za->zp = NULL;
+ reopen_on_error = 1;
}
if (_zip_rename(temp, za->zn) != 0) {
- _zip_error_set(&za->error, ZIP_ER_RENAME, errno);
- remove(temp);
- free(temp);
- if (reopen_on_error) {
- /* ignore errors, since we're already in an error case */
- za->zp = fopen(za->zn, "rb");
- }
- return -1;
+ _zip_error_set(&za->error, ZIP_ER_RENAME, errno);
+ remove(temp);
+ free(temp);
+ if (reopen_on_error) {
+ /* ignore errors, since we're already in an error case */
+ za->zp = fopen(za->zn, "rb");
}
+ return -1;
+ }
#ifndef PHP_WIN32
mask = umask(0);
umask(mask);