tony2001 Tue May 16 13:05:23 2006 UTC Modified files: /php-src/main/streams plain_wrapper.c Log: MFB: fix #37395 (recursive mkdir() fails to create nonexistent directories in root dir) http://cvs.php.net/viewcvs.cgi/php-src/main/streams/plain_wrapper.c?r1=1.64&r2=1.65&diff_format=u Index: php-src/main/streams/plain_wrapper.c diff -u php-src/main/streams/plain_wrapper.c:1.64 php-src/main/streams/plain_wrapper.c:1.65 --- php-src/main/streams/plain_wrapper.c:1.64 Wed Mar 8 14:41:45 2006 +++ php-src/main/streams/plain_wrapper.c Tue May 16 13:05:23 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: plain_wrapper.c,v 1.64 2006/03/08 14:41:45 iliaa Exp $ */ +/* $Id: plain_wrapper.c,v 1.65 2006/05/16 13:05:23 tony2001 Exp $ */ #include "php.h" #include "php_globals.h" @@ -1081,7 +1081,7 @@ } else { /* find a top level directory we need to create */ - while ( (p = strrchr(buf + offset, DEFAULT_SLASH)) || (p = strrchr(buf, DEFAULT_SLASH)) ) { + while ( (p = strrchr(buf + offset, DEFAULT_SLASH)) || (offset != 1 && (p = strrchr(buf, DEFAULT_SLASH))) ) { *p = '\0'; if (VCWD_STAT(buf, &sb) == 0) { *p = DEFAULT_SLASH;
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php