From 9c06a1f304c51d595df7f9225f70f3d35af010fb Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 29 Mar 2008 15:28:57 +0000 Subject: [PATCH] (Fexpand_file_name): Fix last change. --- src/fileio.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 2af8124a850..70b72f52553 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1064,6 +1064,7 @@ See also the function `substitute-in-file-name'. */) int length; Lisp_Object handler, result; int multibyte; + Lisp_Object hdir; CHECK_STRING (name); @@ -1385,8 +1386,12 @@ See also the function `substitute-in-file-name'. */) nm++; /* egetenv may return a unibyte string, which will bite us since we expect the directory to be multibyte. */ - tem = string_to_multibyte (build_string (newdir)); - newdir = SDATA (tem); + tem = build_string (newdir); + if (!STRING_MULTIBYTE (tem)) + { + hdir = DECODE_FILE (tem); + newdir = SDATA (hdir); + } #ifdef DOS_NT collapse_newdir = 0; #endif -- 2.39.2