changeset 1494:164556174150

[project @ 1995-09-29 05:35:05 by jwe]
author jwe
date Fri, 29 Sep 1995 05:35:05 +0000
parents bfd64ec144d1
children d5e5ad6f3e63
files kpathsea/elt-dirs.c
diffstat 1 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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.  */