diff options
| author | Eli Zaretskii | 2014-10-28 19:48:21 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2014-10-28 19:48:21 +0200 |
| commit | 205be0810af6814de7ca6fc57391bbd5096339aa (patch) | |
| tree | 011cc66ba8f0c124823b948dc6fc90b734f03a32 | |
| parent | 7515423bc1935efeb43a85097e00f8758a7cc394 (diff) | |
| download | emacs-205be0810af6814de7ca6fc57391bbd5096339aa.tar.gz emacs-205be0810af6814de7ca6fc57391bbd5096339aa.zip | |
Fix bug #18873 with non-ASCII characters in user's HOME directory.
src/fileio.c (Fexpand_file_name): Use make_unibyte_string, not
build_string, when importing a home directory.
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/fileio.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index da3e4d682d5..33ee723fe66 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2014-10-28 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * fileio.c (Fexpand_file_name): Use make_unibyte_string, not | ||
| 4 | build_string, when importing a home directory. (Bug#18873) | ||
| 5 | |||
| 1 | 2014-10-26 Eli Zaretskii <eliz@gnu.org> | 6 | 2014-10-26 Eli Zaretskii <eliz@gnu.org> |
| 2 | 7 | ||
| 3 | * dispnew.c (buffer_posn_from_coords): Use | 8 | * dispnew.c (buffer_posn_from_coords): Use |
diff --git a/src/fileio.c b/src/fileio.c index b4653017b28..fba64010b54 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -1166,7 +1166,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) | |||
| 1166 | char newdir_utf8[MAX_UTF8_PATH]; | 1166 | char newdir_utf8[MAX_UTF8_PATH]; |
| 1167 | 1167 | ||
| 1168 | filename_from_ansi (newdir, newdir_utf8); | 1168 | filename_from_ansi (newdir, newdir_utf8); |
| 1169 | tem = build_string (newdir_utf8); | 1169 | tem = make_unibyte_string (newdir_utf8, strlen (newdir_utf8)); |
| 1170 | } | 1170 | } |
| 1171 | else | 1171 | else |
| 1172 | #endif | 1172 | #endif |
| @@ -1200,7 +1200,7 @@ filesystem tree, not (expand-file-name ".." dirname). */) | |||
| 1200 | /* `getpwnam' may return a unibyte string, which will | 1200 | /* `getpwnam' may return a unibyte string, which will |
| 1201 | bite us since we expect the directory to be | 1201 | bite us since we expect the directory to be |
| 1202 | multibyte. */ | 1202 | multibyte. */ |
| 1203 | tem = build_string (newdir); | 1203 | tem = make_unibyte_string (newdir, strlen (newdir)); |
| 1204 | if (multibyte && !STRING_MULTIBYTE (tem)) | 1204 | if (multibyte && !STRING_MULTIBYTE (tem)) |
| 1205 | { | 1205 | { |
| 1206 | hdir = DECODE_FILE (tem); | 1206 | hdir = DECODE_FILE (tem); |