* elmo-cache.el (elmo-folder-append-buffer): Return nil on failure.
* elmo-localdir.el (elmo-folder-append-buffer): Ditto.
* elmo-split.el (elmo-split-subr): Check return value of
elmo-folder-append-buffer.
* elmo-localdir.el (elmo-folder-append-buffer): Create flag-table.
* elmo-cache.el (elmo-folder-append-buffer): Check existence of
message-id.
+2004-04-11 Yoichi NAKAYAMA <yoichi@geiin.org>
+
+ * elmo.el (elmo-folder-append-buffer): Add note on return value.
+ * elmo-cache.el (elmo-folder-append-buffer): Return nil on failure.
+ * elmo-localdir.el (elmo-folder-append-buffer): Ditto.
+ * elmo-split.el (elmo-split-subr): Check return value of
+ elmo-folder-append-buffer.
+
+ * elmo-localdir.el (elmo-folder-append-buffer): Create flag-table.
+
+ * elmo-cache.el (elmo-folder-append-buffer): Check existence of
+ message-id.
+
2004-04-10 Yoichi NAKAYAMA <yoichi@geiin.org>
* elmo-split.el (elmo-split-subr): Append message with flag.
&optional flag number)
;; dir-name is changed according to msgid.
(unless (elmo-cache-folder-dir-name-internal folder)
- (let* ((file (elmo-file-cache-get-path (std11-field-body "message-id")))
- (dir (directory-file-name (file-name-directory file))))
- (unless (file-exists-p dir)
- (elmo-make-directory dir))
- (when (file-writable-p file)
- (write-region-as-binary
- (point-min) (point-max) file nil 'no-msg))))
- t)
+ (let ((msgid (std11-field-body "message-id"))
+ file dir)
+ (when msgid
+ (setq file (elmo-file-cache-get-path msgid))
+ (setq dir (directory-file-name (file-name-directory file)))
+ (unless (file-exists-p dir)
+ (elmo-make-directory dir))
+ (when (and (file-writable-p file)
+ (not (file-exists-p file)))
+ (write-region-as-binary
+ (point-min) (point-max) file nil 'no-msg)
+ t)))))
(luna-define-method elmo-map-folder-delete-messages ((folder elmo-cache-folder)
locations)
folder
(or number
(1+ (car (elmo-folder-status folder)))))))
- (when (file-writable-p filename)
+ (when (and (file-writable-p filename)
+ (not (file-exists-p filename)))
(write-region-as-binary
(point-min) (point-max) filename nil 'no-msg)
+ (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 flag)
+ (elmo-flag-table-save path table)))
t)))
(luna-define-method elmo-folder-append-messages :around
action)))
(elmo-folder-create target-folder)))
(elmo-folder-open-internal target-folder)
- (elmo-folder-append-buffer target-folder (or flags '(read)))
+ (setq failure (not (elmo-folder-append-buffer target-folder (or flags '(read)))))
(elmo-folder-close-internal target-folder))
(error (setq failure t)
(incf fcount)))
FOLDER is the destination folder(ELMO folder structure).
FLAG is the status of appended message.
If optional argument NUMBER is specified, the new message number is set
-\(if possible\).")
+\(if possible\).
+Return nil on failure.")
(luna-define-generic elmo-folder-append-messages (folder
src-folder