From: Eli Zaretskii Date: Sat, 29 Mar 2008 15:28:57 +0000 (+0000) Subject: (Fexpand_file_name): Fix last change. X-Git-Tag: emacs-pretest-23.0.90~6796 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=9c06a1f304c51d595df7f9225f70f3d35af010fb;p=emacs.git (Fexpand_file_name): Fix last change. --- 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