From: Eli Zaretskii Date: Sat, 29 Mar 2008 13:53:02 +0000 (+0000) Subject: (Fexpand_file_name): Convert the value of $HOME to a multibyte string. X-Git-Tag: emacs-pretest-23.0.90~6797 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d5577783e2e909808280438eae1c2d6293fdf34;p=emacs.git (Fexpand_file_name): Convert the value of $HOME to a multibyte string. --- diff --git a/src/ChangeLog b/src/ChangeLog index 33c1b324e97..c7f52c3dd6a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2008-03-29 Eli Zaretskii + + * fileio.c (Fexpand_file_name): Convert the value of $HOME to a + multibyte string. + 2008-03-29 Stefan Monnier * keyboard.c (pending_funcalls): New var. diff --git a/src/fileio.c b/src/fileio.c index fe05cf9d441..2af8124a850 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -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