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

Re: Anybody know what's going on in xsymlinks()? [utils.c]



"Bart Schaefer" wrote:
> In 3.1.x, xsymlinks() returns 1 whenever it has called itself recursively,
> and returns 0 otherwise.

It only calls itself recursively when it has just successfully found a
symbolic link, which is what the return status is really about --- it's
used to know whether to print " -> <resolved-link>" in print_if_link().
The code construction is a little odd at that point, however, since (flag
== 0) apparently has the same effect as not having CHASELINKS set, but
instead will try to read the link and then ignore the result.  I didn't see
an obvious bug but I didn't try very hard.

-- 
Peter Stephenson <pws@xxxxxxxxxxxxxxxxx>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy



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