diff options
author | Wez Furlong <wez@php.net> | 2004-03-29 21:44:07 +0000 |
---|---|---|
committer | Wez Furlong <wez@php.net> | 2004-03-29 21:44:07 +0000 |
commit | 32be6f268b59eed7ec5f1bcfd0a88e112a50dd85 (patch) | |
tree | d0563b087c985c809a33a89b2e695d7c24643578 /main | |
parent | 904dac52e2f1445899598d727c7fb511defb9d10 (diff) | |
download | php-git-32be6f268b59eed7ec5f1bcfd0a88e112a50dd85.tar.gz |
Fix for Bug #26757: session.save_path defaults to bogus value on win32
Merge from branch with one main difference: the default save_path is
set to the empty string on all platforms, whereas the code in the
branch only does so for win32.
Diffstat (limited to 'main')
-rw-r--r-- | main/php_open_temporary_file.c | 4 | ||||
-rw-r--r-- | main/php_open_temporary_file.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/main/php_open_temporary_file.c b/main/php_open_temporary_file.c index a3db16deb6..b8c94528cd 100644 --- a/main/php_open_temporary_file.c +++ b/main/php_open_temporary_file.c @@ -164,7 +164,7 @@ static int php_do_open_temporary_file(const char *path, const char *pfx, char ** /* * Determine where to place temporary files. */ -const char* get_temporary_directory() +PHPAPI const char* php_get_temporary_directory(void) { /* Cache the chosen temporary directory. */ static char* temporary_directory; @@ -231,7 +231,7 @@ PHPAPI int php_open_temporary_fd(const char *dir, const char *pfx, char **opened fd = php_do_open_temporary_file(dir, pfx, opened_path_p TSRMLS_CC); if (fd == -1) { /* Use default temporary directory. */ - fd = php_do_open_temporary_file(get_temporary_directory(), pfx, opened_path_p TSRMLS_CC); + fd = php_do_open_temporary_file(php_get_temporary_directory(), pfx, opened_path_p TSRMLS_CC); } return fd; } diff --git a/main/php_open_temporary_file.h b/main/php_open_temporary_file.h index db1c5f8493..500d2429c3 100644 --- a/main/php_open_temporary_file.h +++ b/main/php_open_temporary_file.h @@ -24,6 +24,7 @@ BEGIN_EXTERN_C() PHPAPI FILE *php_open_temporary_file(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC); PHPAPI int php_open_temporary_fd(const char *dir, const char *pfx, char **opened_path_p TSRMLS_DC); +PHPAPI const char *php_get_temporary_directory(void); END_EXTERN_C() #endif /* PHP_OPEN_TEMPORARY_FILE_H */ |