From 857fd372ee7908cca436e7662f1462815b6ad099 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 7 Dec 2013 16:59:37 +0200 Subject: [PATCH] Fixed $HOME in expand-file-name. --- src/fileio.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) 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); -- 2.39.2