(Fexpand_file_name): Fix last change.
authorEli Zaretskii <eliz@gnu.org>
Sat, 29 Mar 2008 15:28:57 +0000 (15:28 +0000)
committerEli Zaretskii <eliz@gnu.org>
Sat, 29 Mar 2008 15:28:57 +0000 (15:28 +0000)
src/fileio.c

index 2af8124..70b72f5 100644 (file)
@@ -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