glob: Fix comment about collapsing asterisks after r317749.
After r317749, collapsing adjacent asterisks is still required, but for a different reason.
This commit is contained in:
parent
6c39df7f25
commit
ca682b7f08
@ -581,7 +581,8 @@ glob0(const Char *pattern, glob_t *pglob, struct glob_limit *limit,
|
|||||||
case STAR:
|
case STAR:
|
||||||
pglob->gl_flags |= GLOB_MAGCHAR;
|
pglob->gl_flags |= GLOB_MAGCHAR;
|
||||||
/* collapse adjacent stars to one,
|
/* collapse adjacent stars to one,
|
||||||
* to avoid exponential behavior
|
* to ensure "**" at the end continues to match the
|
||||||
|
* empty string
|
||||||
*/
|
*/
|
||||||
if (bufnext == patbuf || bufnext[-1] != M_ALL)
|
if (bufnext == patbuf || bufnext[-1] != M_ALL)
|
||||||
*bufnext++ = M_ALL;
|
*bufnext++ = M_ALL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user