summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/zip/lib/zip_open.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ext/zip/lib/zip_open.c b/ext/zip/lib/zip_open.c
index 0a14abda58..c8d45146db 100644
--- a/ext/zip/lib/zip_open.c
+++ b/ext/zip/lib/zip_open.c
@@ -75,6 +75,10 @@ zip_open(const char *fn, int flags, int *zep)
return NULL;
}
+#ifdef PHP_WIN32
+ _fmode = _O_BINARY;
+#endif
+
if (flags & ZIP_OVERWRITE || stat(fn, &st) != 0) {
if ((flags & ZIP_CREATE) || (flags & ZIP_OVERWRITE)) {
if ((za=_zip_new(&error)) == NULL) {