# HG changeset patch # User Eli Zaretskii # Date 1206804537 0 # Node ID dcff6c60c69e8853a0deb0eb1012af7a502aa115 # Parent dc87cb6ec6a60805622da2e00868ea7b2310cbcb (Fexpand_file_name): Fix last change. diff -r dc87cb6ec6a6 -r dcff6c60c69e src/fileio.c --- a/src/fileio.c Sat Mar 29 13:53:02 2008 +0000 +++ b/src/fileio.c Sat Mar 29 15:28:57 2008 +0000 @@ -1064,6 +1064,7 @@ int length; Lisp_Object handler, result; int multibyte; + Lisp_Object hdir; CHECK_STRING (name); @@ -1385,8 +1386,12 @@ 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