]> code.delx.au - gnu-emacs/blobdiff - src/buffer.c
(truncate_undo_list): Return void.
[gnu-emacs] / src / buffer.c
index b3b0407803619d5e452604ee24a94e0720a1893a..2d931272467ff61ecfb37a7764e855f66d1ebd07 100644 (file)
@@ -5162,7 +5162,13 @@ init_buffer ()
     }
 #endif /* not VMS */
 
-  current_buffer->directory = build_string (buf);
+  current_buffer->directory = make_unibyte_string (buf, strlen (buf));
+  if (! NILP (buffer_defaults.enable_multibyte_characters))
+    /* At this momemnt, we still don't know how to decode the
+       direcotry name.  So, we keep the bytes in multibyte form so
+       that ENCODE_FILE correctly gets the original bytes.  */
+    current_buffer->directory
+      = string_to_multibyte (current_buffer->directory);
 
   /* Add /: to the front of the name
      if it would otherwise be treated as magic.  */