int length;
Lisp_Object handler, result;
int multibyte;
+ Lisp_Object hdir;
CHECK_STRING (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