From 1d61562efe60bfdefc29ed36c4f9345a7ce10f8c Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Wed, 15 Nov 2006 16:24:24 +0000 Subject: [PATCH] #39506 and PECL #9278, should fix the problem for the other SAPI (works for CLI, CGI and embed) see: http://news.php.net/php.internals/26606 for the details --- ext/zip/lib/zip_open.c | 4 ++++ 1 file changed, 4 insertions(+) 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) { -- 2.40.0