iliaa Mon Jun 7 14:30:17 2004 EDT
Modified files:
/php-src/ext/standard dir.c
Log:
Fixed bug #28668 (glob() does not work with relative paths on Windows).
http://cvs.php.net/diff.php/php-src/ext/standard/dir.c?r1=1.139&r2=1.140&ty=u
Index: php-src/ext/standard/dir.c
diff -u php-src/ext/standard/dir.c:1.139 php-src/ext/standard/dir.c:1.140
--- php-src/ext/standard/dir.c:1.139 Sun Jun 6 12:21:11 2004
+++ php-src/ext/standard/dir.c Mon Jun 7 14:30:16 2004
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: dir.c,v 1.139 2004/06/06 16:21:11 iliaa Exp $ */
+/* $Id: dir.c,v 1.140 2004/06/07 18:30:16 iliaa Exp $ */
/* {{{ includes/startup/misc */
@@ -380,13 +380,12 @@
cwd[0] = '\0';
}
#ifdef PHP_WIN32
- if (!IS_SLASH(cwd[0])) {
+ if (IS_SLASH(*pattern)) {
cwd[2] = '\0';
- cwd_skip = 3;
}
-#else
- cwd_skip = strlen(cwd)+1;
#endif
+ cwd_skip = strlen(cwd)+1;
+
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