changeset 21393:5f153464fc99

(Fdirectory_files): Use make_uninit_multibyte_string. Use STRING_BYTES on encoded_directory.
author Karl Heuer <kwzh@gnu.org>
date Mon, 06 Apr 1998 21:52:29 +0000
parents 20bc0bd34ada
children 19ed30856b50
files src/dired.c
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/dired.c	Mon Apr 06 10:33:02 1998 +0000
+++ b/src/dired.c	Mon Apr 06 21:52:29 1998 +0000
@@ -183,7 +183,7 @@
     report_file_error ("Opening directory", Fcons (directory, Qnil));
 
   list = Qnil;
-  dirnamelen = XSTRING (encoded_directory)->size;
+  dirnamelen = STRING_BYTES (XSTRING (encoded_directory));
   re_match_object = Qt;
 
   /* Decide whether we need to add a directory separator.  */
@@ -191,7 +191,7 @@
   if (dirnamelen == 0
       || !IS_ANY_SEP (XSTRING (encoded_directory)->data[dirnamelen - 1]))
     needsep = 1;
-#endif /* VMS */
+#endif /* not VMS */
 
   GCPRO2 (encoded_directory, list);
 
@@ -214,7 +214,8 @@
 		  int total = len + dirnamelen;
 		  int nchars;
 
-		  name = make_uninit_string (total + needsep);
+		  name = make_uninit_multibyte_string (total + needsep,
+						       total + needsep);
 		  bcopy (XSTRING (encoded_directory)->data, XSTRING (name)->data,
 			 dirnamelen);
 		  if (needsep)