* elmo-maildir.el (elmo-folder-append-buffer): Create flag-table.
authoryoichi <yoichi>
Sat, 10 Apr 2004 17:52:19 +0000 (17:52 +0000)
committeryoichi <yoichi>
Sat, 10 Apr 2004 17:52:19 +0000 (17:52 +0000)
elmo/ChangeLog
elmo/elmo-maildir.el

index d1c684a..8a1be11 100644 (file)
@@ -7,6 +7,7 @@
        elmo-folder-append-buffer.
 
        * elmo-localdir.el (elmo-folder-append-buffer): Create flag-table.
+       * elmo-maildir.el (elmo-folder-append-buffer): Ditto.
 
        * elmo-cache.el (elmo-folder-append-buffer): Check existence of
        message-id.
index 74a7405..e88906d 100644 (file)
@@ -393,7 +393,7 @@ file name for maildir directories."
     filename))
 
 (luna-define-method elmo-folder-append-buffer ((folder elmo-maildir-folder)
-                                              &optional flag number)
+                                              &optional flags number)
   (let ((basedir (elmo-maildir-folder-directory-internal folder))
        (src-buf (current-buffer))
        dst-buf filename)
@@ -411,6 +411,12 @@ file name for maildir directories."
           (expand-file-name
            (concat "new/" (file-name-nondirectory filename))
            basedir))
+         (let* ((path (elmo-folder-msgdb-path folder))
+                (table (elmo-flag-table-load path))
+                (msgid (std11-field-body "message-id")))
+           (when msgid
+             (elmo-flag-table-set table msgid flags)
+             (elmo-flag-table-save path table)))
          t)
       ;; If an error occured, return nil.
       (error))))