# HG changeset patch # User jwe # Date 812352905 0 # Node ID 164556174150c6731ba0a77c79485822add43689 # Parent bfd64ec144d1e79c8426874afdb9fad0c3007872 [project @ 1995-09-29 05:35:05 by jwe] diff -r bfd64ec144d1 -r 164556174150 kpathsea/elt-dirs.c --- a/kpathsea/elt-dirs.c Fri Sep 29 04:33:24 1995 +0000 +++ b/kpathsea/elt-dirs.c Fri Sep 29 05:35:05 1995 +0000 @@ -284,7 +284,16 @@ /* OK, so much for the trivial cases. We handle the hard case in a subroutine. */ else - expand_elt (ret, elt, 0); + { + /* If the path starts with ~ or ~user, expand it. Do this + before calling `expand_subdir' or `add_directory', so that + we don't expand the same ~ over and over. */ + string dir = kpse_expand (elt); + + expand_elt (ret, dir, 0); + + free (dir); + } /* Remember the directory list we just found, in case future calls are made with the same ELT. */