Mercurial > emacs
diff src/dired.c @ 21261:edaef0e79ff0
(Fdirectory_files): In FULL case, compute number of characters
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sat, 21 Mar 1998 18:23:09 +0000 |
| parents | 13e905e1d33c |
| children | 28b9e0d48deb |
line wrap: on
line diff
--- a/src/dired.c Sat Mar 21 18:09:01 1998 +0000 +++ b/src/dired.c Sat Mar 21 18:23:09 1998 +0000 @@ -206,6 +206,7 @@ int afterdirindex = dirnamelen; int total = len + dirnamelen; int needsep = 0; + int nchars; /* Decide whether we need to add a directory separator. */ #ifndef VMS @@ -221,6 +222,11 @@ XSTRING (name)->data[afterdirindex++] = DIRECTORY_SEP; bcopy (dp->d_name, XSTRING (name)->data + afterdirindex, len); + nchars = chars_in_text (dp->d_name, + afterdirindex + len); + XSTRING (name)->size = nchars; + if (nchars == STRING_BYTES (XSTRING (name))) + SET_STRING_BYTES (XSTRING (name), -1); } else name = make_string (dp->d_name, len);
