# HG changeset patch # User Eli Zaretskii # Date 1206798733 0 # Node ID 92ec903498d4151cd89976b37d383a07e69042f5 # Parent 8e46096e0cb3f30842bb65962d565d304254be2e (Fexpand_file_name): Convert the value of $HOME to a multibyte string. diff -r 8e46096e0cb3 -r 92ec903498d4 src/fileio.c --- 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