]> git.eshelyaron.com Git - emacs.git/commitdiff
(Fexpand_file_name): Convert the value of $HOME to a multibyte string.
authorEli Zaretskii <eliz@gnu.org>
Sat, 29 Mar 2008 13:53:02 +0000 (13:53 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 29 Mar 2008 13:53:02 +0000 (13:53 +0000)
src/ChangeLog
src/fileio.c

index 33c1b324e9782bfb64033c0610667e0ea4ceb738..c7f52c3dd6a59e017e70174e0438fc5c6994794c 100644 (file)
@@ -1,3 +1,8 @@
+2008-03-29  Eli Zaretskii  <eliz@gnu.org>
+
+       * fileio.c (Fexpand_file_name): Convert the value of $HOME to a
+       multibyte string.
+
 2008-03-29  Stefan Monnier  <monnier@iro.umontreal.ca>
 
        * keyboard.c (pending_funcalls): New var.
index fe05cf9d441b97bff5ab0b05f96804691267ac61..2af8124a8503478f0f8e3954b392dc16930df17e 100644 (file)
@@ -1378,9 +1378,15 @@ See also the function `substitute-in-file-name'.  */)
 #endif /* VMS */
          || nm[1] == 0)        /* ~ by itself */
        {
+         Lisp_Object tem;
+
          if (!(newdir = (unsigned char *) egetenv ("HOME")))
            newdir = (unsigned char *) "";
          nm++;
+         /* egetenv may return a unibyte string, which will bite us since
+            we expect the directory to be multibyte.  */
+         tem = string_to_multibyte (build_string (newdir));
+         newdir = SDATA (tem);
 #ifdef DOS_NT
          collapse_newdir = 0;
 #endif