From 6d060996f12345b05c1e798c98f5e78977ddcac3 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Fri, 2 Nov 2007 03:18:22 +0000 Subject: [PATCH] (Fexpand_file_name): Adjust multibyteness of directory and file names. --- src/fileio.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/fileio.c b/src/fileio.c index 8155a6e981f..51a40e66db9 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -1145,8 +1145,19 @@ See also the function `substitute-in-file-name'. */) } name = FILE_SYSTEM_CASE (name); - nm = SDATA (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); #ifdef DOS_NT /* We will force directory separators to be either all \ or /, so make @@ -1455,7 +1466,6 @@ See also the function `substitute-in-file-name'. */) && !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] == ':') -- 2.39.5