about summary refs log tree commit diff
path: root/Src/pattern.c
diff options
context:
space:
mode:
Diffstat (limited to 'Src/pattern.c')
-rw-r--r--Src/pattern.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Src/pattern.c b/Src/pattern.c
index eef88ac6e..d0241dd12 100644
--- a/Src/pattern.c
+++ b/Src/pattern.c
@@ -1339,6 +1339,8 @@ pattryrefs(Patprog prog, char *string, int *nump, int *begp, int *endp)
 	    ((prog->flags & PAT_NOANCH) ? 
 	     !strncmp(progstr, string, prog->patmlen)
 	     : !strcmp(progstr, string))) {
+	    if ((prog->flags & PAT_NOGLD) && *string == '.')
+		return 0;
 	    /* in case used for ${..#..} etc. */
 	    patinput = string + prog->patmlen;
 	    /* if matching files, must update globbing flags */