From ba3cbf9aa81cbbeaf6d7016121f364ae3784bf79 Mon Sep 17 00:00:00 2001 From: yoichi Date: Sat, 10 Apr 2004 17:52:19 +0000 Subject: [PATCH] * elmo-maildir.el (elmo-folder-append-buffer): Create flag-table. --- elmo/ChangeLog | 1 + elmo/elmo-maildir.el | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/elmo/ChangeLog b/elmo/ChangeLog index d1c684a..8a1be11 100644 --- a/elmo/ChangeLog +++ b/elmo/ChangeLog @@ -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. diff --git a/elmo/elmo-maildir.el b/elmo/elmo-maildir.el index 74a7405..e88906d 100644 --- a/elmo/elmo-maildir.el +++ b/elmo/elmo-maildir.el @@ -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)))) -- 1.7.10.4