This mail goes to upstream as well.
[2011-03-14 18:17] Florian Ernst <florian_er...@gmx.net> > On Tue, Jun 22, 2010 at 01:21:20PM +0200, markus schnalke wrote: > > > > Tree prints `argetm' in front of symlink names. See: > > [...] > > This bug was reported from lenny/stable, but it exists in sid/unstable > > too. > > Hmm, unfortunately I cannot reproduce this misbehavior at all, neither > in Etch, Lenny, Squeeze nor in Wheezy/Sid, using different set of > installed and used locales. As such I now mark this bugreport > correspondingly. > > Do you still experience this error? Anything you could possibly add to > the bugreport? Now I dug deeper in the bug and found the reasons. The problem shows up only if you colorize the output. Then tree takes the colors defined by $LS_COLORS. This looks like that: no=00:fi=00:di=01;34:ln=target:pi=40;33:so=01;35:... Each key has a color value, which may be used directly in a terminal escape sequence, except `ln' which may also have the value ``target''. See: Symbolic link. If you set this to `target' instead of a numerical value, the color is as for the file pointed to. http://www.bigsoft.co.uk/blog/index.php/2008/04/11/configuring-ls_colors This special case leads to the bug, reported here. With the above $LS_COLORS, the escape sequence for a directory would be `^[[01;34m'. For a link we get `^[[targetm', resulting in the escape sequence `^[[t' and the text `argetm'. In the sources start reading at tree.c:1391 parse_dir_colors(), the ``Hacked in DIR_COLORS support for linux.'' There $LS_COLORS is split and link_flgs gets set (It could be to `target'). 1433 case COL_LINK: 1434 if (c[1]) link_flgs = scopy(c[1]); 1435 break; If link_flgs is set to `target' stat(2), instead of lstat(2), should be used for symlinks. Or maybe we should do a further stat(2) in this case. Maybe this function can be handled in a similar way as orphan and missing links. Or tree would simply ignore `ln=target' and use some default link color instead. This should be left open to upstream. meillo P.S. I took tree-1.5.2 for reference. -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org