From 14810d6df13e0564a606b74e4c4e918e80862e25 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Sat, 24 Jul 1999 14:01:54 +0000 Subject: zsh-3.1.6-test-3 --- Src/exec.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'Src/exec.c') diff --git a/Src/exec.c b/Src/exec.c index dc281675f..eab846540 100644 --- a/Src/exec.c +++ b/Src/exec.c @@ -2922,7 +2922,7 @@ doshfunc(char *name, List list, LinkList doshargs, int flags, int noreturnval) tab = pparams; oldscriptname = scriptname; - scriptname = name; + scriptname = dupstring(name); oldzoptind = zoptind; zoptind = 1; @@ -3145,6 +3145,7 @@ cancd2(char *s) { struct stat buf; char *us, *us2 = NULL; + int ret; /* * If CHASEDOTS and CHASELINKS are not set, we want to rationalize the @@ -3159,9 +3160,10 @@ cancd2(char *s) fixdir(us2 = us); } else us = unmeta(s); - return !(access(us, X_OK) || stat(us, &buf) || !S_ISDIR(buf.st_mode)); + ret = !(access(us, X_OK) || stat(us, &buf) || !S_ISDIR(buf.st_mode)); if (us2) free(us2); + return ret; } /**/ -- cgit 1.4.1