about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/glob.c5
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1bb72c837..b89c9d307 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-01-01  Barton E. Schaefer  <schaefer@zsh.org>
 
+	* 37483: Src/glob.c: save and possibly restore cshnullglob failure
+	state around each evaluation of an (e:...:) glob qualifier.
+
 	* 37473: Src/exec.c: check for cshnullglob in command position.
 
 2015-12-31  Barton E. Schaefer  <schaefer@zsh.org>
diff --git a/Src/glob.c b/Src/glob.c
index 94b3f620d..8bd2fc493 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -3802,13 +3802,16 @@ qualsheval(char *name, UNUSED(struct stat *buf), UNUSED(off_t days), char *str)
 
     if ((prog = parse_string(str, 0))) {
 	int ef = errflag, lv = lastval, ret;
+	int cshglob = badcshglob;
 
 	unsetparam("reply");
 	setsparam("REPLY", ztrdup(name));
+	badcshglob = 0;
 
 	execode(prog, 1, 0, "globqual");
 
-	ret = lastval;
+	if ((ret = lastval))
+	    badcshglob |= cshglob;
 	/* Retain any user interrupt error status */
 	errflag = ef | (errflag & ERRFLAG_INT);
 	lastval = lv;