From c7d9606066d3a9b75a87c4ca5dd3420a66d0b54f Mon Sep 17 00:00:00 2001 From: Russell Belfer Date: Sun, 6 Apr 2014 11:20:22 -0700 Subject: [PATCH] Fix fnmatch comment to be clearer --- src/fnmatch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/fnmatch.c b/src/fnmatch.c index 8e5424b75..3846bab3c 100644 --- a/src/fnmatch.c +++ b/src/fnmatch.c @@ -55,7 +55,9 @@ p_fnmatchx(const char *pattern, const char *string, int flags, size_t recurs) case '*': c = *pattern; - /* Apply '**' to overwrite PATHNAME match */ + /* Let '**' override PATHNAME match for this segment. + * It will be restored if/when we recurse below. + */ if (c == '*') { flags &= ~FNM_PATHNAME; while (c == '*')