From: Eli Zaretskii Date: Sat, 7 Dec 2013 14:59:37 +0000 (+0200) Subject: Fixed $HOME in expand-file-name. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~446^2~18 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=857fd372ee7908cca436e7662f1462815b6ad099;p=emacs.git Fixed $HOME in expand-file-name. --- diff --git a/src/fileio.c b/src/fileio.c index 476d77f8244..e5347ce765a 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1164,7 +1164,18 @@ filesystem tree, not (expand-file-name ".." dirname). */) nm++; /* `egetenv' may return a unibyte string, which will bite us since we expect the directory to be multibyte. */ - tem = build_string (newdir); +#ifdef WINDOWSNT + if (newdir[0]) + { + char newdir_utf8[MAX_UTF8_PATH]; + + filename_from_ansi (newdir, newdir_utf8); + tem = build_string (newdir_utf8); + } + else +#else + tem = build_string (newdir); +#endif if (multibyte && !STRING_MULTIBYTE (tem)) { hdir = DECODE_FILE (tem);