aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKenichi Handa2004-09-28 04:37:26 +0000
committerKenichi Handa2004-09-28 04:37:26 +0000
commitd7259fdb27c7fdfb3582c323b7951a107c5d5f94 (patch)
tree4d9ebdfb4d325dc54cadb7828aad1e89a620dd62 /src
parent503815da519a22f858e2341b45f4b97c9795bd70 (diff)
downloademacs-d7259fdb27c7fdfb3582c323b7951a107c5d5f94.tar.gz
emacs-d7259fdb27c7fdfb3582c323b7951a107c5d5f94.zip
(report_file_error): Make a unibyte string from
strerror (errorno). (Fsubstitute_in_file_name): Fix the arg to unibyte_char_to_multibyte. It is evaluated twice.
Diffstat (limited to 'src')
-rw-r--r--src/fileio.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/fileio.c b/src/fileio.c
index 7c0490e6978..a8fa5bfef0d 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -256,9 +256,12 @@ report_file_error (string, data)
256{ 256{
257 Lisp_Object errstring; 257 Lisp_Object errstring;
258 int errorno = errno; 258 int errorno = errno;
259 char *str;
259 260
260 synchronize_system_messages_locale (); 261 synchronize_system_messages_locale ();
261 errstring = code_convert_string_norecord (build_string (strerror (errorno)), 262 str = strerror (errorno);
263 errstring = code_convert_string_norecord (make_unibyte_string (str,
264 strlen (str)),
262 Vlocale_coding_system, 0); 265 Vlocale_coding_system, 0);
263 266
264 while (1) 267 while (1)
@@ -2251,7 +2254,8 @@ duplicates what `expand-file-name' does. */)
2251 convert what we substitute into multibyte. */ 2254 convert what we substitute into multibyte. */
2252 while (*o) 2255 while (*o)
2253 { 2256 {
2254 int c = unibyte_char_to_multibyte (*o++); 2257 int c = unibyte_char_to_multibyte (*o);
2258 o++;
2255 x += CHAR_STRING (c, x); 2259 x += CHAR_STRING (c, x);
2256 } 2260 }
2257 } 2261 }