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;
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);