diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2003-02-28 13:50:44 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2003-02-28 13:50:44 +0000 |
commit | 79d0de7c3ad8626d507b50176a80cf7ecb6f3996 (patch) | |
tree | 7009741bcfcf45c42ddea3be5a48807bc10f2ea9 /Src | |
parent | 937e1b9f795e5fa3d605ae908ad96757e38014f7 (diff) | |
download | zsh-79d0de7c3ad8626d507b50176a80cf7ecb6f3996.tar.gz zsh-79d0de7c3ad8626d507b50176a80cf7ecb6f3996.tar.xz zsh-79d0de7c3ad8626d507b50176a80cf7ecb6f3996.zip |
merge changes from 4.1
Diffstat (limited to 'Src')
-rw-r--r-- | Src/glob.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Src/glob.c b/Src/glob.c index 27a351137..40da2807b 100644 --- a/Src/glob.c +++ b/Src/glob.c @@ -181,9 +181,9 @@ static struct globdata curglobdata; (N).gd_pathpos = pathpos; \ (N).gd_pathbuf = pathbuf; \ (N).gd_pathbufsz = 0; \ - (N).gd_pathbuf = NULL; \ (N).gd_glob_pre = glob_pre; \ (N).gd_glob_suf = glob_suf; \ + pathbuf = NULL; \ } while (0) #define restore_globstate(N) \ @@ -234,7 +234,7 @@ addpath(char *s) } /* stat the filename s appended to pathbuf. l should be true for lstat, * - * false for stat. If st is NULL, the file is only chechked for existance. * + * false for stat. If st is NULL, the file is only checked for existance. * * s == "" is treated as s == ".". This is necessary since on most systems * * foo/ can be used to reference a non-directory foo. Returns nonzero if * * the file does not exists. */ @@ -1421,6 +1421,7 @@ zglob(LinkList list, LinkNode np, int nountok) } else if (isset(NOMATCH)) { zerr("no matches found: %s", ostr, 0); free(matchbuf); + restore_globstate(saved); return; } else { /* treat as an ordinary string */ |