summaryrefslogtreecommitdiffstats
path: root/Src/pattern.c
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-15 12:05:46 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-15 12:05:46 +0000
commit92881643eeef732af9a99427bb5382e18d1e923e (patch)
treef94438a4459d1a77eee3ef05f462b6f455bb8b9c /Src/pattern.c
parentzsh-workers/7827 (diff)
downloadzsh-92881643eeef732af9a99427bb5382e18d1e923e.tar
zsh-92881643eeef732af9a99427bb5382e18d1e923e.tar.gz
zsh-92881643eeef732af9a99427bb5382e18d1e923e.tar.bz2
zsh-92881643eeef732af9a99427bb5382e18d1e923e.tar.lz
zsh-92881643eeef732af9a99427bb5382e18d1e923e.tar.xz
zsh-92881643eeef732af9a99427bb5382e18d1e923e.tar.zst
zsh-92881643eeef732af9a99427bb5382e18d1e923e.zip
zsh-workers/7834
Diffstat (limited to 'Src/pattern.c')
-rw-r--r--Src/pattern.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Src/pattern.c b/Src/pattern.c
index e5c0a0cb3..63551967f 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -338,11 +338,12 @@ patcompile(char *exp, int inflags, char **endexp)
if (!(patflags & PAT_ANY)) {
/* Look for a really pure string, with no tokens at all. */
- for (strp = exp; *strp &&
- (!(patflags & PAT_FILE) || *strp != '/') && !itok(*strp);
- strp++)
- ;
- if (*strp && *strp != '/') {
+ if (!patglobflags)
+ for (strp = exp; *strp &&
+ (!(patflags & PAT_FILE) || *strp != '/') && !itok(*strp);
+ strp++)
+ ;
+ if (!strp || (*strp && *strp != '/')) {
/* No, do normal compilation. */
strp = NULL;
if (patcompswitch(0, &flags) == 0)