helly Wed Jan 30 23:43:13 2008 UTC
Modified files: (Branch: PHP_5_3)
/php-src/main/streams glob_wrapper.c
Log:
- MFH Get rid of overoptimization
http://cvs.php.net/viewvc.cgi/php-src/main/streams/glob_wrapper.c?r1=1.6.2.3&r2=1.6.2.4&diff_format=u
Index: php-src/main/streams/glob_wrapper.c
diff -u php-src/main/streams/glob_wrapper.c:1.6.2.3
php-src/main/streams/glob_wrapper.c:1.6.2.4
--- php-src/main/streams/glob_wrapper.c:1.6.2.3 Mon Dec 31 07:17:17 2007
+++ php-src/main/streams/glob_wrapper.c Wed Jan 30 23:43:13 2008
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: glob_wrapper.c,v 1.6.2.3 2007/12/31 07:17:17 sebastian Exp $ */
+/* $Id: glob_wrapper.c,v 1.6.2.4 2008/01/30 23:43:13 helly Exp $ */
#include "php.h"
#include "php_streams_int.h"
@@ -49,7 +49,7 @@
PHPAPI char* _php_glob_stream_get_path(php_stream *stream, int copy, int *plen
STREAMS_DC TSRMLS_DC) /* {{{ */
{
glob_s_t *pglob = (glob_s_t *)stream->abstract;
-
+
if (pglob && pglob->path) {
if (plen) {
*plen = pglob->path_len;
@@ -251,9 +251,7 @@
pglob->pattern_len = strlen(pos);
pglob->pattern = estrndup(pos, pglob->pattern_len);
- if (strcspn(path, "*?[") < (path_len - pglob->pattern_len)) {
- pglob->flags |= GLOB_APPEND;
- }
+ pglob->flags |= GLOB_APPEND;
if (pglob->glob.gl_pathc) {
php_glob_stream_path_split(pglob, pglob->glob.gl_pathv[0], 1,
&tmp TSRMLS_CC);
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php