From 2c11564d0a429f0ee6ca412b2f7e6bbcaa48df86 Mon Sep 17 00:00:00 2001 From: Wez Furlong Date: Mon, 18 Nov 2002 11:50:36 +0000 Subject: [PATCH] MFH other temp file mode fixes and Id tag. --- main/php_open_temporary_file.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index e6a83a9c38..ed4af333ee 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -16,6 +16,8 @@ +----------------------------------------------------------------------+ */ +/* $Id$ */ + #include "php.h" #include @@ -138,7 +140,7 @@ static FILE *php_do_open_temporary_file(const char *path, const char *pfx, char /* Using standard mktemp() implementation for NetWare */ file_path = mktemp(opened_path); if (file_path) { - fp = VCWD_FOPEN(file_path, "wb"); + fp = VCWD_FOPEN(file_path, "r+b"); } else { fp = NULL; } @@ -151,7 +153,7 @@ static FILE *php_do_open_temporary_file(const char *path, const char *pfx, char } #else if (mktemp(opened_path)) { - fp = VCWD_FOPEN(opened_path, "wb"); + fp = VCWD_FOPEN(opened_path, "r+b"); } else { fp = NULL; } -- 2.40.0