diff options
| author | Russell Belfer <rb@github.com> | 2014-05-01 12:46:46 -0700 |
|---|---|---|
| committer | Russell Belfer <rb@github.com> | 2014-05-01 12:46:46 -0700 |
| commit | d19b2f9f9f2480130bd901246aa3e3843810e5fd (patch) | |
| tree | aa30337bf0d79d6418b8e59edcffe23576382bfa /src/fnmatch.c | |
| parent | 9d878fc420037a78f6ab36b86a42641cbd9425e0 (diff) | |
| download | libgit2-d19b2f9f9f2480130bd901246aa3e3843810e5fd.tar.gz | |
Make ** pattern eat trailing slashrb/fix-starstar-again
This allows "foo/**/*.html" to match "foo/file.html"
Diffstat (limited to 'src/fnmatch.c')
| -rw-r--r-- | src/fnmatch.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/fnmatch.c b/src/fnmatch.c index 3846bab3c..d8a83a8ed 100644 --- a/src/fnmatch.c +++ b/src/fnmatch.c @@ -62,6 +62,8 @@ p_fnmatchx(const char *pattern, const char *string, int flags, size_t recurs) flags &= ~FNM_PATHNAME; while (c == '*') c = *++pattern; + if (c == '/') + c = *++pattern; } if (*string == '.' && (flags & FNM_PERIOD) && |
