cvs: /php4 fopen-wrappers.c

From: Date: Sun, 27 Feb 2000 05:23:19 +0000
Subject: cvs: /php4 fopen-wrappers.c
Groups: php.version4 
Request: Send a blank email to php-version4+get-11069@lists.php.net to get a copy of this message
andi Sat Feb 26 21:23:19 2000 EDT Modified files: /php4 fopen-wrappers.c Log: - Fix bug 3640 Index: php4/fopen-wrappers.c diff -u php4/fopen-wrappers.c:1.43 php4/fopen-wrappers.c:1.44 --- php4/fopen-wrappers.c:1.43 Fri Feb 25 19:20:47 2000 +++ php4/fopen-wrappers.c Sat Feb 26 21:22:48 2000 @@ -16,7 +16,7 @@ | Jim Winstead <jimw@php.net> | +----------------------------------------------------------------------+ */ -/* $Id: fopen-wrappers.c,v 1.43 2000/02/26 03:20:47 zeev Exp $ */ +/* $Id: fopen-wrappers.c,v 1.44 2000/02/27 05:22:48 andi Exp $ */ #include "php.h" #include "php_globals.h" @@ -975,12 +975,20 @@ if (filepath[1] == '.') { /* parent directory - .. */ /* erase the last directory name from the path */ +#if PHP_WIN32 + while (*cwd_end != '/' || *cwd_end != '\\') { +#else while (*cwd_end != '/') { +#endif *cwd_end-- = 0; } filepath++; /* make filepath appear as a current directory path */ } +#if PHP_WIN32 + if (cwd_end > cwd && (*cwd_end == '/' || *cwd_end == '\\')) { /* remove trailing slashes */ +#else if (cwd_end > cwd && *cwd_end == '/') { /* remove trailing slashes */ +#endif *cwd_end-- = 0; } retval = (char *) malloc(strlen(cwd) + strlen(filepath) - 1 + 1);

« previous php.version4 (#11069) next »