Fix bug #15426 with directory-files invoked from a unibyte buffer.

src/dired.c (directory_files_internal): Use multibyte_chars_in_text,
 not chars_in_text, whose result depends on the multibyteness of
 the current buffer.
This commit is contained in:
Eli Zaretskii 2013-09-21 14:48:19 +03:00
parent 878294497c
commit b3f1d1198a
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2013-09-21 Eli Zaretskii <eliz@gnu.org>
* dired.c (directory_files_internal): Use multibyte_chars_in_text,
not chars_in_text, whose result depends on the multibyteness of
the current buffer. (Bug#15426)
2013-09-20 Paul Eggert <eggert@cs.ucla.edu> 2013-09-20 Paul Eggert <eggert@cs.ucla.edu>
Port recent change to hosts where pointers aren't 'long'. Port recent change to hosts where pointers aren't 'long'.

View file

@ -278,7 +278,7 @@ directory_files_internal (Lisp_Object directory, Lisp_Object full,
memcpy (SDATA (fullname) + directory_nbytes + needsep, memcpy (SDATA (fullname) + directory_nbytes + needsep,
SDATA (name), len); SDATA (name), len);
nchars = chars_in_text (SDATA (fullname), nbytes); nchars = multibyte_chars_in_text (SDATA (fullname), nbytes);
/* Some bug somewhere. */ /* Some bug somewhere. */
if (nchars > nbytes) if (nchars > nbytes)