[tex-k] Problems for HOME with trailing "/"

Karl Berry karl at freefriends.org
Sat Dec 1 23:52:25 CET 2007


Hi Daniel,

    kpsewhich (probably other kpathsea tools as well) are incredibly slow when 
    called with ${HOME} having a trailing slash.  

Well, at least if you have a large home directory :).

    If this cannot be fixed (maybe by parsing ${HOME} to remove any trailing 

Right now, kpathsea doesn't treat $HOME differently than any other
variable.  I suppose we could add a special case (in the kpse_var_value
function in kpathsea/variable.c, I think), so that if we getenv("HOME")
and it ends in a /, the slash is removed.  I do agree having the /
included there is nothing but pain.

I wrote some special-case code to do this in tilde.c for ~ and ~user
expansion, but since texmf.cnf uses $HOME, that's pretty useless.

    item in http://www.tug.org/texinfohtml/kpathsea.html#Slow-path-searching 

Certainly I can at least do that, if we don't munge the code.

Thanks for writing,
karl


More information about the tex-k mailing list