]> git.eshelyaron.com Git - emacs.git/commitdiff
(report_file_error): Fix handling of multibyte error string.
authorKenichi Handa <handa@m17n.org>
Wed, 27 Aug 2008 01:11:41 +0000 (01:11 +0000)
committerKenichi Handa <handa@m17n.org>
Wed, 27 Aug 2008 01:11:41 +0000 (01:11 +0000)
src/ChangeLog
src/fileio.c

index c7bda92493abf6210b6e9bb28ed0bb25f0b53a2a..259bc7f04edf89089af6d730f5d12940957f3f12 100644 (file)
@@ -1,3 +1,8 @@
+2008-08-27  Kenichi Handa  <handa@m17n.org>
+
+       * fileio.c (report_file_error): Fix handling of multibyte error
+       string.
+
 2008-08-27  Andreas Seltenreich  <seltenreich@gmx.de>
 
        * xterm.c (x_term_init): Temporarily hide the partially
index d289f426eb1f3128c49e1a9d3acdafd0f9142a6d..8eb1b3a2c8711ef95195ccb2790e767a85df9925 100644 (file)
@@ -261,8 +261,14 @@ report_file_error (string, data)
       default:
        /* System error messages are capitalized.  Downcase the initial
           unless it is followed by a slash.  */
-       if (SREF (errstring, 1) != '/')
-         SSET (errstring, 0, DOWNCASE (SREF (errstring, 0)));
+       if (! EQ (Faref (errstring, make_number (1)), make_number ('/')))
+         {
+           int c;
+
+           str = (char *) SDATA (errstring);
+           c = STRING_CHAR (str, 0);
+           Faset (errstring, 0, make_number (DOWNCASE (c)));
+         }
 
        xsignal (Qfile_error,
                 Fcons (build_string (string), Fcons (errstring, data)));