diff options
| author | Kenichi Handa | 2007-11-02 03:18:22 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2007-11-02 03:18:22 +0000 |
| commit | 6d060996f12345b05c1e798c98f5e78977ddcac3 (patch) | |
| tree | 0d6e6f5f56d3545ebeb39b0f53f1c5dcd6b891c8 /src | |
| parent | 6b1c1c403b21fbbc4af2dd90d1384a743a6acaaa (diff) | |
| download | emacs-6d060996f12345b05c1e798c98f5e78977ddcac3.tar.gz emacs-6d060996f12345b05c1e798c98f5e78977ddcac3.zip | |
(Fexpand_file_name): Adjust multibyteness of directory
and file names.
Diffstat (limited to 'src')
| -rw-r--r-- | src/fileio.c | 14 |
1 files 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'. */) | |||
| 1145 | } | 1145 | } |
| 1146 | 1146 | ||
| 1147 | name = FILE_SYSTEM_CASE (name); | 1147 | name = FILE_SYSTEM_CASE (name); |
| 1148 | nm = SDATA (name); | ||
| 1149 | multibyte = STRING_MULTIBYTE (name); | 1148 | multibyte = STRING_MULTIBYTE (name); |
| 1149 | if (multibyte != STRING_MULTIBYTE (default_directory)) | ||
| 1150 | { | ||
| 1151 | if (multibyte) | ||
| 1152 | default_directory = string_to_multibyte (default_directory); | ||
| 1153 | else | ||
| 1154 | { | ||
| 1155 | name = string_to_multibyte (name); | ||
| 1156 | multibyte = 1; | ||
| 1157 | } | ||
| 1158 | } | ||
| 1159 | |||
| 1160 | nm = SDATA (name); | ||
| 1150 | 1161 | ||
| 1151 | #ifdef DOS_NT | 1162 | #ifdef DOS_NT |
| 1152 | /* We will force directory separators to be either all \ or /, so make | 1163 | /* We will force directory separators to be either all \ or /, so make |
| @@ -1455,7 +1466,6 @@ See also the function `substitute-in-file-name'. */) | |||
| 1455 | && !newdir) | 1466 | && !newdir) |
| 1456 | { | 1467 | { |
| 1457 | newdir = SDATA (default_directory); | 1468 | newdir = SDATA (default_directory); |
| 1458 | multibyte |= STRING_MULTIBYTE (default_directory); | ||
| 1459 | #ifdef DOS_NT | 1469 | #ifdef DOS_NT |
| 1460 | /* Note if special escape prefix is present, but remove for now. */ | 1470 | /* Note if special escape prefix is present, but remove for now. */ |
| 1461 | if (newdir[0] == '/' && newdir[1] == ':') | 1471 | if (newdir[0] == '/' && newdir[1] == ':') |