mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-23 10:34:07 +00:00
(Fexpand_file_name): Convert the value of $HOME to a multibyte string.
This commit is contained in:
parent
f5c3336520
commit
8fe2123ed1
@ -1,3 +1,8 @@
|
||||
2008-08-02 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* fileio.c (Fexpand_file_name): Convert the value of $HOME to a
|
||||
multibyte string.
|
||||
|
||||
2008-08-01 Jason Rumney <jasonr@gnu.org>
|
||||
|
||||
* w32term.c (x_draw_composite_glyph_string_foreground): Force
|
||||
|
11
src/fileio.c
11
src/fileio.c
@ -1066,6 +1066,7 @@ See also the function `substitute-in-file-name'. */)
|
||||
int length;
|
||||
Lisp_Object handler, result;
|
||||
int multibyte;
|
||||
Lisp_Object hdir;
|
||||
|
||||
CHECK_STRING (name);
|
||||
|
||||
@ -1369,9 +1370,19 @@ 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 = build_string (newdir);
|
||||
if (!STRING_MULTIBYTE (tem))
|
||||
{
|
||||
hdir = DECODE_FILE (tem);
|
||||
newdir = SDATA (hdir);
|
||||
}
|
||||
#ifdef DOS_NT
|
||||
collapse_newdir = 0;
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user