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

elmo/elmo-dop.el

index 586c165..4b31e93 100644 (file)
@@ -247,7 +247,7 @@ 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))
-       failure)
+       failure saved)
     (with-temp-buffer
       (elmo-message-fetch spool-folder number
                          (elmo-make-fetch-strategy 'entire)
@@ -258,9 +258,12 @@ FOLDER is the folder structure."
        (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))
+       (setq saved (elmo-folder-append-buffer
+                    (elmo-make-folder elmo-lost+found-folder)
+                    unread set-number)))
+      (if (or (not failure)
+             saved)
+         (elmo-folder-delete-messages spool-folder (list number)))
       t)))
 
 (defun elmo-folder-delete-messages-dop-delayed (folder number-alist)