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:
Jilles Tjoelker 2017-05-07 19:52:56 +00:00
parent 3f2da875f7
commit 8f932310ff

View File

@ -581,7 +581,8 @@ glob0(const Char *pattern, glob_t *pglob, struct glob_limit *limit,
case STAR:
pglob->gl_flags |= GLOB_MAGCHAR;
/* 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)
*bufnext++ = M_ALL;