com php-src: Revert "fix occasional fail in zip_close when target arc exists": ext/zip/lib/zip_source_fil ep.c
| From: | Anatol Belski | Date: | Wed, 19 Aug 2015 17:00:53 +0000 |
| Subject: | com php-src: Revert "fix occasional fail in zip_close when target arc exists": ext/zip/lib/zip_source_fil ep.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-88691@lists.php.net to get a copy of this message | ||
Commit: 09970d803156d74eff9f5d51f8943b7cb0425c8f
Author: Anatol Belski <ab@php.net> Wed, 19 Aug 2015 18:54:23 +0200
Parents: e6aa1fb2493fc0c361d1a4d9c17c1de63bd5c56c
Branches: master
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=09970d803156d74eff9f5d51f8943b7cb0425c8f
Log:
Revert "fix occasional fail in zip_close when target arc exists"
This reverts commit ed78d59a1dc9d84cf6ce77fbad94ab7e2f860cb5.
Changed paths:
M ext/zip/lib/zip_source_filep.c
Diff:
diff --git a/ext/zip/lib/zip_source_filep.c b/ext/zip/lib/zip_source_filep.c
index f99da22..e541305 100644
--- a/ext/zip/lib/zip_source_filep.c
+++ b/ext/zip/lib/zip_source_filep.c
@@ -43,7 +43,6 @@
#ifdef _WIN32
/* WIN32 needs <fcntl.h> for _O_BINARY */
#include <fcntl.h>
-#include <windows.h>
#endif
/* Windows sys/types.h does not provide these */
@@ -249,17 +248,10 @@ read_file(void *state, void *data, zip_uint64_t len, zip_source_cmd_t cmd)
zip_error_set(&ctx->error, ZIP_ER_WRITE, errno);
}
ctx->fout = NULL;
-#ifdef _WIN32
- if (!MoveFileEx(ctx->tmpname, ctx->fname, MOVEFILE_REPLACE_EXISTING)) {
- zip_error_set(&ctx->error, ZIP_ER_RENAME, GetLastError());
- return -1;
- }
-#else
if (rename(ctx->tmpname, ctx->fname) < 0) {
zip_error_set(&ctx->error, ZIP_ER_RENAME, errno);
return -1;
}
-#endif
mask = umask(022);
umask(mask);
/* not much we can do if chmod fails except make the whole commit fail */