From ca682b7f08afd67e44ec5690f5a6cae7474f7b48 Mon Sep 17 00:00:00 2001 From: jilles Date: Sun, 7 May 2017 19:52:56 +0000 Subject: [PATCH] glob: Fix comment about collapsing asterisks after r317749. After r317749, collapsing adjacent asterisks is still required, but for a different reason. --- lib/libc/gen/glob.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/glob.c b/lib/libc/gen/glob.c index c4364407cdef..a36c522c4bdd 100644 --- a/lib/libc/gen/glob.c +++ b/lib/libc/gen/glob.c @@ -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;