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
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=317913

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;