From 4ef373153a83d6749f9a688a00d02947a90b7478 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Sat, 16 Nov 2002 22:52:22 +0000 Subject: [PATCH] Change "wb" -> "r+b" for win32. The difference is staggering - I've spent hours tracking this down. It should probably be made the same for all platforms. --- main/php_open_temporary_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index 9911a69233..e6a83a9c38 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -130,7 +130,7 @@ static FILE *php_do_open_temporary_file(const char *path, const char *pfx, char #ifdef PHP_WIN32 if (GetTempFileName(path, pfx, 0, opened_path)) { - fp = VCWD_FOPEN(opened_path, "wb"); + fp = VCWD_FOPEN(opened_path, "r+b"); } else { fp = NULL; } -- 2.50.1