about summary refs log tree commit diff
path: root/Src/glob.c
diff options
context:
space:
mode:
authorBarton E. Schaefer <schaefer@zsh.org>2016-01-01 19:20:14 -0800
committerBarton E. Schaefer <schaefer@zsh.org>2016-01-01 19:20:14 -0800
commitb4643fce2d4220646c0d70876822c052a677d22b (patch)
tree2e705dae8c2f07226d9f783468ddfe845c23521b /Src/glob.c
parent5c17f9ab3f7c873f8a04498af8d77d5f3ca8e3e0 (diff)
downloadzsh-b4643fce2d4220646c0d70876822c052a677d22b.tar.gz
zsh-b4643fce2d4220646c0d70876822c052a677d22b.tar.xz
zsh-b4643fce2d4220646c0d70876822c052a677d22b.zip
37483: save and possibly restore cshnullglob failure state around each evaluation of an (e:...:) glob qualifier.
Diffstat (limited to 'Src/glob.c')
-rw-r--r--Src/glob.c5
1 files changed, 4 insertions, 1 deletions
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;