cvs: php4 /main fopen-wrappers.c
| From: | Andi Gutmans | Date: | Tue, 03 Oct 2000 15:05:50 +0000 |
| Subject: | cvs: php4 /main fopen-wrappers.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-1921@lists.php.net to get a copy of this message | ||
andi Tue Oct 3 08:05:50 2000 EDT
Modified files:
/php4/main fopen-wrappers.c
Log:
- Fix V_CHDIR_FILE() to only chdir() when a directory part is specified.
Use this instead of broken php_dirname() in fopen-wrappers.c
Index: php4/main/fopen-wrappers.c
diff -u php4/main/fopen-wrappers.c:1.93 php4/main/fopen-wrappers.c:1.94
--- php4/main/fopen-wrappers.c:1.93 Sun Oct 1 11:13:41 2000
+++ php4/main/fopen-wrappers.c Tue Oct 3 08:05:50 2000
@@ -16,7 +16,7 @@
| Jim Winstead <jimw@php.net> |
+----------------------------------------------------------------------+
*/
-/* $Id: fopen-wrappers.c,v 1.93 2000/10/01 18:13:41 andi Exp $ */
+/* $Id: fopen-wrappers.c,v 1.94 2000/10/03 15:05:50 andi Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -281,7 +281,7 @@
{
FILE *fp;
struct stat st;
- char *temp, *path_info, *filename;
+ char *path_info, *filename;
int length;
PLS_FETCH();
SLS_FETCH();
@@ -358,13 +358,7 @@
STR_FREE(SG(request_info).path_translated); /* for same reason as above */
return NULL;
}
-
- temp = estrdup(filename);
- php_dirname(temp, strlen(temp));
- if (*temp) {
- V_CHDIR(temp);
- }
- efree(temp);
+ V_CHDIR_FILE(filename);
SG(request_info).path_translated = filename;
return fp;