]> granicus.if.org Git - php/commitdiff
Change "wb" -> "r+b" for win32.
authorWez Furlong <wez@php.net>
Sat, 16 Nov 2002 22:52:22 +0000 (22:52 +0000)
committerWez Furlong <wez@php.net>
Sat, 16 Nov 2002 22:52:22 +0000 (22:52 +0000)
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

index 9911a6923343e9abb0982a77766565fcc61ed006..e6a83a9c3881c747943df5208c1c18599e8f136c 100644 (file)
@@ -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;
        }