tony2001 Mon Jan 16 19:48:23 2006 UTC
Modified files: (Branch: PHP_5_1)
/php-src/main/streams plain_wrapper.c
/php-src NEWS
Log:
MFH: fix #35999 (recursive mkdir() does not work with relative path like
"foo/bar")
http://cvs.php.net/viewcvs.cgi/php-src/main/streams/plain_wrapper.c?r1=1.52.2.4&r2=1.52.2.5&diff_format=u
Index: php-src/main/streams/plain_wrapper.c
diff -u php-src/main/streams/plain_wrapper.c:1.52.2.4
php-src/main/streams/plain_wrapper.c:1.52.2.5
--- php-src/main/streams/plain_wrapper.c:1.52.2.4 Sun Jan 1 12:50:18 2006
+++ php-src/main/streams/plain_wrapper.c Mon Jan 16 19:48:23 2006
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: plain_wrapper.c,v 1.52.2.4 2006/01/01 12:50:18 sniper Exp $ */
+/* $Id: plain_wrapper.c,v 1.52.2.5 2006/01/16 19:48:23 tony2001 Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -1095,12 +1095,17 @@
offset = p - buf + 1;
}
- /* find a top level directory we need to create */
- while ((p = strrchr(buf + offset, DEFAULT_SLASH))) {
- *p = '\0';
- if (VCWD_STAT(buf, &sb) == 0) {
- *p = DEFAULT_SLASH;
- break;
+ if (p && dir_len == 1) {
+ /* buf == "DEFAULT_SLASH" */
+ }
+ else {
+ /* find a top level directory we need to create */
+ while ( (p = strrchr(buf + offset, DEFAULT_SLASH)) ||
(p = strrchr(buf, DEFAULT_SLASH)) ) {
+ *p = '\0';
+ if (VCWD_STAT(buf, &sb) == 0) {
+ *p = DEFAULT_SLASH;
+ break;
+ }
}
}
http://cvs.php.net/viewcvs.cgi/php-src/NEWS?r1=1.2027.2.358&r2=1.2027.2.359&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.358 php-src/NEWS:1.2027.2.359
--- php-src/NEWS:1.2027.2.358 Mon Jan 16 10:12:36 2006
+++ php-src/NEWS Mon Jan 16 19:48:23 2006
@@ -9,6 +9,8 @@
- Fixed bug #36011 (Strict errormsg wrong for call_user_func() and the likes).
(Marcus)
- Fixed bug #36006 (Problem with $this in __destruct()). (Dmitry)
+- Fixed bug #35999 (recursive mkdir() does not work with relative path
+ like "foo/bar"). (Tony)
- Fixed bug #35998 (SplFileInfo::getPathname() returns unix style filenames
in win32). (Marcus)
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php