diff options
author | Leah Neukirchen <leah@vuxu.org> | 2017-10-12 16:36:41 +0200 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2017-10-12 16:36:41 +0200 |
commit | 8a11cc1f6be91c64c9805576d30d1de9d6505dfc (patch) | |
tree | 026891fb4fddad8d905abb46c3b8c5483cd61bf3 /xe.c | |
parent | fd6b6873a5fac960a8085d75f2c9d4316a1cabb5 (diff) | |
download | xe-8a11cc1f6be91c64c9805576d30d1de9d6505dfc.tar.gz xe-8a11cc1f6be91c64c9805576d30d1de9d6505dfc.tar.xz xe-8a11cc1f6be91c64c9805576d30d1de9d6505dfc.zip |
perc_match: patterns with ** match against full path too
Diffstat (limited to 'xe.c')
-rw-r--r-- | xe.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xe.c b/xe.c index 7e75a57..000c0b3 100644 --- a/xe.c +++ b/xe.c @@ -493,7 +493,7 @@ perc(char *pat, char *str, int lvl) int perc_match(char *pat, char *arg) { - if (!strchr(pat, '/')) { + if (!strchr(pat, '/') && !strstr(pat, "**")) { char *d = strrchr(arg, '/'); if (d) arg = d + 1; @@ -515,7 +515,7 @@ perc_subst(char *pat, char *base, char *arg) if (strcmp(arg, replace) == 0) return base; - if (!strchr(pat, '/')) { + if (!strchr(pat, '/') && !strstr(pat, "**")) { char *d = strrchr(base, '/'); if (d) base = d + 1; |