Mercurial > emacs
comparison src/fileio.c @ 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 | 6d11337f1ad8 |
children | dcff6c60c69e |
comparison
equal
deleted
inserted
replaced
93382:8e46096e0cb3 | 93383:92ec903498d4 |
---|---|
1376 #ifdef VMS | 1376 #ifdef VMS |
1377 || nm[1] == ':' | 1377 || nm[1] == ':' |
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 |
1387 #ifdef VMS | 1393 #ifdef VMS |
1388 nm++; /* Don't leave the slash in nm. */ | 1394 nm++; /* Don't leave the slash in nm. */ |