diff options
author | Barton E. Schaefer <schaefer@zsh.org> | 2016-01-01 19:20:14 -0800 |
---|---|---|
committer | Barton E. Schaefer <schaefer@zsh.org> | 2016-01-01 19:20:14 -0800 |
commit | b4643fce2d4220646c0d70876822c052a677d22b (patch) | |
tree | 2e705dae8c2f07226d9f783468ddfe845c23521b /Src | |
parent | 5c17f9ab3f7c873f8a04498af8d77d5f3ca8e3e0 (diff) | |
download | zsh-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')
-rw-r--r-- | Src/glob.c | 5 |
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; |