* elmo-localdir.el (elmo-folder-append-messages): Treat flags for
authorteranisi <teranisi>
Thu, 17 Jul 2003 13:33:29 +0000 (13:33 +0000)
committerteranisi <teranisi>
Thu, 17 Jul 2003 13:33:29 +0000 (13:33 +0000)
local file messages.

elmo/ChangeLog
elmo/elmo-localdir.el

index b30ab8d..ef6538f 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-17  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo-localdir.el (elmo-folder-append-messages): Treat flags for
+       local file messages.
+
 2003-07-17  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
 
        * elmo.el (elmo-generic-folder-append-messages): Set flag as nil
index 0a75990..7af928a 100644 (file)
    src-folder numbers &optional same-number)
   (if (elmo-folder-message-file-p src-folder)
       (let ((dir (elmo-localdir-folder-directory-internal folder))
+           (table (elmo-flag-table-load (elmo-folder-msgdb-path folder)))
            (succeeds numbers)
-           (next-num (1+ (car (elmo-folder-status folder)))))
+           (next-num (1+ (car (elmo-folder-status folder))))
+           mark flag)
        (while numbers
+         (setq mark (elmo-message-mark src-folder (car numbers))
+               flag (cond
+                     ((null mark) nil)
+                     ((member mark (elmo-msgdb-answered-marks))
+                      'answered)
+                     ;;
+                     ((not (member mark (elmo-msgdb-unread-marks)))
+                      'read)))
          (elmo-copy-file
           (elmo-message-file-name src-folder (car numbers))
           (expand-file-name
            (int-to-string
             (if same-number (car numbers) next-num))
            dir))
+         (elmo-flag-table-set table
+                              (elmo-message-field
+                               src-folder (car numbers)
+                               'message-id)
+                              flag)
          (elmo-progress-notify 'elmo-folder-move-messages)
          (if (and (setq numbers (cdr numbers))
                   (not same-number))
                        ;; MDA is running.
                        (1+ (car (elmo-folder-status folder)))
                      (1+ next-num)))))
+       (when (elmo-folder-persistent-p folder)
+         (elmo-flag-table-save (elmo-folder-msgdb-path folder) table))
        succeeds)
     (luna-call-next-method)))