* elmo-dop.el (elmo-folder-append-buffer-dop-delayed):
authorteranisi <teranisi>
Wed, 3 Oct 2001 04:48:10 +0000 (04:48 +0000)
committerteranisi <teranisi>
Wed, 3 Oct 2001 04:48:10 +0000 (04:48 +0000)
Check return value of elmo-folder-append-buffer.

elmo/ChangeLog
elmo/elmo-dop.el

index 72fb802..bbd4033 100644 (file)
@@ -3,6 +3,8 @@
        * elmo.el (elmo-generic-folder-append-messages): Check return value of
        elmo-folder-append-buffer.
 
+       * elmo-dop.el (elmo-folder-append-buffer-dop-delayed): Ditto.
+
        * elmo-localdir.el (elmo-folder-append-buffer): Ditto.
 
        * elmo-archive.el (elmo-archive-folder-append-buffer): Return t
index 9e5812d..586c165 100644 (file)
@@ -246,17 +246,20 @@ FOLDER is the folder structure."
 
 ;;; Delayed operation (executed at online status).
 (defun elmo-folder-append-buffer-dop-delayed (folder unread number set-number)
-  (let ((spool-folder (elmo-dop-spool-folder folder)))
+  (let ((spool-folder (elmo-dop-spool-folder folder))
+       failure)
     (with-temp-buffer
       (elmo-message-fetch spool-folder number
                          (elmo-make-fetch-strategy 'entire)
                          nil (current-buffer) 'unread)
       (condition-case nil 
-         (elmo-folder-append-buffer folder unread set-number)
-       (error
-        ;; Append failed...
-        (elmo-folder-append-buffer (elmo-make-folder elmo-lost+found-folder)
-                                   unread set-number)))
+         (setq failure (not
+                        (elmo-folder-append-buffer folder unread set-number)))
+       (error (setq failure t)))
+      (when failure
+       ;; Append failed...
+       (elmo-folder-append-buffer (elmo-make-folder elmo-lost+found-folder)
+                                  unread set-number))
       (elmo-folder-delete-messages spool-folder (list number))
       t)))