diff options
author | Eli Zaretskii <eliz@gnu.org> | 2008-03-29 15:28:57 +0000 |
---|---|---|
committer | Eli Zaretskii <eliz@gnu.org> | 2008-03-29 15:28:57 +0000 |
commit | 9c06a1f304c51d595df7f9225f70f3d35af010fb (patch) | |
tree | bee9095e30718a6d6a02022103bd5f4f441c3a4c /src | |
parent | 6d5577783e2e909808280438eae1c2d6293fdf34 (diff) | |
download | emacs-9c06a1f304c51d595df7f9225f70f3d35af010fb.tar.gz emacs-9c06a1f304c51d595df7f9225f70f3d35af010fb.tar.bz2 emacs-9c06a1f304c51d595df7f9225f70f3d35af010fb.zip |
(Fexpand_file_name): Fix last change.
Diffstat (limited to 'src')
-rw-r--r-- | src/fileio.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 |