Mercurial > emacs
changeset 93383:92ec903498d4
(Fexpand_file_name): Convert the value of $HOME to a multibyte string.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 29 Mar 2008 13:52:13 +0000 |
parents | 8e46096e0cb3 |
children | dc87cb6ec6a6 |
files | src/fileio.c |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Sat Mar 29 05:34:52 2008 +0000 +++ b/src/fileio.c Sat Mar 29 13:52:13 2008 +0000 @@ -1378,9 +1378,15 @@ #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