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 | |
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.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Src/glob.c | 5 |
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; |