Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: symlink chain.



On Sun, 4 Jan 2015 13:04:20 -0500
Vin Shelton <acs@xxxxxxxxxxxxxxxxxxxx> wrote:
> "whence -s" no longer works in a way I would expect.

It doesn't work at all with chains of links owing to a typo when I add
-S...

diff --git a/Src/utils.c b/Src/utils.c
index 2b2a815..959df9a 100644
--- a/Src/utils.c
+++ b/Src/utils.c
@@ -795,12 +795,12 @@ xsymlinks(char *s, int full)
 	    }
 	    if (*xbuf3 == '/') {
 		strcpy(xbuf, "");
-		if (xsymlinks(xbuf3 + 1, 0) < 0)
+		if (xsymlinks(xbuf3 + 1, 1) < 0)
 		    ret = -1;
 		else
 		    xbuflen = strlen(xbuf);
 	    } else
-		if (xsymlinks(xbuf3, 0) < 0)
+		if (xsymlinks(xbuf3, 1) < 0)
 		    ret = -1;
 		else
 		    xbuflen = strlen(xbuf);

-- 
Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
Web page now at http://homepage.ntlworld.com/p.w.stephenson/



Messages sorted by: Reverse Date, Date, Thread, Author