Mercurial > emacs
changeset 91078:2a54f2cb1b4b
(Fexpand_file_name): Adjust multibyteness of directory
and file names.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Fri, 02 Nov 2007 03:18:22 +0000 |
parents | 74fda5245f7e |
children | 5b7ab62ae6bd |
files | src/fileio.c |
diffstat | 1 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/fileio.c Thu Nov 01 01:54:48 2007 +0000 +++ b/src/fileio.c Fri Nov 02 03:18:22 2007 +0000 @@ -1145,8 +1145,19 @@ } name = FILE_SYSTEM_CASE (name); + multibyte = STRING_MULTIBYTE (name); + if (multibyte != STRING_MULTIBYTE (default_directory)) + { + if (multibyte) + default_directory = string_to_multibyte (default_directory); + else + { + name = string_to_multibyte (name); + multibyte = 1; + } + } + nm = SDATA (name); - multibyte = STRING_MULTIBYTE (name); #ifdef DOS_NT /* We will force directory separators to be either all \ or /, so make @@ -1455,7 +1466,6 @@ && !newdir) { newdir = SDATA (default_directory); - multibyte |= STRING_MULTIBYTE (default_directory); #ifdef DOS_NT /* Note if special escape prefix is present, but remove for now. */ if (newdir[0] == '/' && newdir[1] == ':')