iliaa Fri Sep 19 22:51:21 2003 EDT
Modified files:
/php-src/ext/standard dir.c
Log:
Fixed bug #25583 (Incorrect handling of paths starting with / on win32
inside glob() function).
Index: php-src/ext/standard/dir.c
diff -u php-src/ext/standard/dir.c:1.127 php-src/ext/standard/dir.c:1.128
--- php-src/ext/standard/dir.c:1.127 Sat Aug 2 09:49:12 2003
+++ php-src/ext/standard/dir.c Fri Sep 19 22:51:20 2003
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dir.c,v 1.127 2003/08/02 13:49:12 helly Exp $ */
+/* $Id: dir.c,v 1.128 2003/09/20 02:51:20 iliaa Exp $ */
/* {{{ includes/startup/misc */
@@ -373,6 +373,11 @@
cwd[0] = '\0';
}
cwd_skip = strlen(cwd)+1;
+#ifdef PHP_WIN32
+ if (IS_SLASH(cwd[0]) && !IS_UNC_PATH(pattern, pattern_len)) {
+ cwd[2] = '\0';
+ }
+#endif
snprintf(work_pattern, MAXPATHLEN, "%s%c%s", cwd, DEFAULT_SLASH,
pattern);
pattern = work_pattern;
}
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php