aboutsummaryrefslogtreecommitdiffstats
path: root/src/fileio.c
diff options
context:
space:
mode:
authorEli Zaretskii2008-03-29 13:53:02 +0000
committerEli Zaretskii2008-03-29 13:53:02 +0000
commit6d5577783e2e909808280438eae1c2d6293fdf34 (patch)
tree90c1ac61aacb65512f684c70e931872cc89e1542 /src/fileio.c
parent115c0061772238c4118c271903336405d35416e7 (diff)
downloademacs-6d5577783e2e909808280438eae1c2d6293fdf34.tar.gz
emacs-6d5577783e2e909808280438eae1c2d6293fdf34.zip
(Fexpand_file_name): Convert the value of $HOME to a multibyte string.
Diffstat (limited to 'src/fileio.c')
-rw-r--r--src/fileio.c6
1 files changed, 6 insertions, 0 deletions
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'. */)
1378#endif /* VMS */ 1378#endif /* VMS */
1379 || nm[1] == 0) /* ~ by itself */ 1379 || nm[1] == 0) /* ~ by itself */
1380 { 1380 {
1381 Lisp_Object tem;
1382
1381 if (!(newdir = (unsigned char *) egetenv ("HOME"))) 1383 if (!(newdir = (unsigned char *) egetenv ("HOME")))
1382 newdir = (unsigned char *) ""; 1384 newdir = (unsigned char *) "";
1383 nm++; 1385 nm++;
1386 /* egetenv may return a unibyte string, which will bite us since
1387 we expect the directory to be multibyte. */
1388 tem = string_to_multibyte (build_string (newdir));
1389 newdir = SDATA (tem);
1384#ifdef DOS_NT 1390#ifdef DOS_NT
1385 collapse_newdir = 0; 1391 collapse_newdir = 0;
1386#endif 1392#endif