changeset 93385:dcff6c60c69e

(Fexpand_file_name): Fix last change.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 29 Mar 2008 15:28:57 +0000
parents dc87cb6ec6a6
children a789a1138b08
files src/fileio.c
diffstat 1 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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