comparison src/fileio.c @ 97747:0d66ae50dc4e

(report_file_error): Fix handling of multibyte error string.
author Kenichi Handa <handa@m17n.org>
date Wed, 27 Aug 2008 01:11:26 +0000
parents 4667576df3e5
children 6a486cee0621
comparison
equal deleted inserted replaced
97746:7d48c48bc07e 97747:0d66ae50dc4e
259 xsignal (Qfile_already_exists, Fcons (errstring, data)); 259 xsignal (Qfile_already_exists, Fcons (errstring, data));
260 break; 260 break;
261 default: 261 default:
262 /* System error messages are capitalized. Downcase the initial 262 /* System error messages are capitalized. Downcase the initial
263 unless it is followed by a slash. */ 263 unless it is followed by a slash. */
264 if (SREF (errstring, 1) != '/') 264 if (! EQ (Faref (errstring, make_number (1)), make_number ('/')))
265 SSET (errstring, 0, DOWNCASE (SREF (errstring, 0))); 265 {
266 int c;
267
268 str = (char *) SDATA (errstring);
269 c = STRING_CHAR (str, 0);
270 Faset (errstring, 0, make_number (DOWNCASE (c)));
271 }
266 272
267 xsignal (Qfile_error, 273 xsignal (Qfile_error,
268 Fcons (build_string (string), Fcons (errstring, data))); 274 Fcons (build_string (string), Fcons (errstring, data)));
269 } 275 }
270 } 276 }