diff options
| author | Marcus Boerger <helly@php.net> | 2008-01-30 23:43:05 +0000 |
|---|---|---|
| committer | Marcus Boerger <helly@php.net> | 2008-01-30 23:43:05 +0000 |
| commit | 7671f2ec4a1781e7a73ee48eb7eeb27f060d9a33 (patch) | |
| tree | 6d1b63a8006ce88779f1575398a8b5ad5421bc8c | |
| parent | 33dc86c43513ca32bbebc811d8aacb1708654af9 (diff) | |
| download | php-git-7671f2ec4a1781e7a73ee48eb7eeb27f060d9a33.tar.gz | |
- Get rid of overoptimization
| -rwxr-xr-x | main/streams/glob_wrapper.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/main/streams/glob_wrapper.c b/main/streams/glob_wrapper.c index 4345056dd2..afc4e128e8 100755 --- a/main/streams/glob_wrapper.c +++ b/main/streams/glob_wrapper.c @@ -49,7 +49,7 @@ typedef struct { 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 @@ static php_stream *php_glob_stream_opener(php_stream_wrapper *wrapper, char *pat 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); |
