* elmo.el (elmo-generic-folder-append-messages): Check return value of
authorteranisi <teranisi>
Wed, 3 Oct 2001 03:54:43 +0000 (03:54 +0000)
committerteranisi <teranisi>
Wed, 3 Oct 2001 03:54:43 +0000 (03:54 +0000)
elmo-folder-append-buffer.

* elmo-localdir.el (elmo-folder-append-buffer): Ditto.

* elmo-imap4.el (elmo-folder-append-buffer): Ditto.

* elmo-archive.el (elmo-archive-folder-append-buffer): Return t
if append buffer content succeds.

elmo/ChangeLog
elmo/elmo-archive.el
elmo/elmo-imap4.el
elmo/elmo-localdir.el
elmo/elmo.el

index 451fc17..e58139b 100644 (file)
@@ -1,3 +1,15 @@
+2001-10-03  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * elmo.el (elmo-generic-folder-append-messages): Check return value of
+       elmo-folder-append-buffer.
+
+       * elmo-localdir.el (elmo-folder-append-buffer): Ditto.
+
+       * elmo-imap4.el (elmo-folder-append-buffer): Ditto.
+
+       * elmo-archive.el (elmo-archive-folder-append-buffer): Return t
+       if append buffer content succeds.
+
 2001-10-02  Yuuichi Teranishi  <teranisi@gohome.org>
 
        * elmo-pop3.el (elmo-message-fetch-plugged): Fixed label for
index cd62a39..eb3e895 100644 (file)
@@ -586,7 +586,8 @@ TYPE specifies the archiver's symbol."
                   (copy-to-buffer dst-buffer (point-min) (point-max)))
                 (as-binary-output-file
                  (write-region (point-min) (point-max) newfile nil 'no-msg))
-                (elmo-archive-call-method method (list arc newfile)))
+                (elmo-archive-call-method method (list arc newfile))
+                t)
             nil))))))
 
 (luna-define-method elmo-folder-append-messages :around
index c8337c9..72c0427 100644 (file)
@@ -2389,7 +2389,8 @@ If optional argument REMOVE is non-nil, remove FLAG."
                    (if unread " " " (\\Seen) ")
                    (elmo-imap4-buffer-literal send-buffer))))
          (kill-buffer send-buffer))
-       result)
+       (and result
+            (elmo-imap4-response-ok-p result)))
     ;; Unplugged
     (if elmo-enable-disconnected-operation
        (elmo-folder-append-buffer-dop folder unread number)
index 1b351aa..7769c2b 100644 (file)
                   folder
                   (or number
                       (1+ (car (elmo-folder-status folder)))))))
-    (if (file-writable-p filename)
-       (write-region-as-binary
-        (point-min) (point-max) filename nil 'no-msg))
-    t))
+    (when (file-writable-p filename)
+      (write-region-as-binary
+       (point-min) (point-max) filename nil 'no-msg)
+      t)))
 
-(luna-define-method elmo-folder-append-messages :around ((folder elmo-localdir-folder)
+(luna-define-method elmo-folder-append-messages :around ((folder
+                                                         elmo-localdir-folder)
                                                         src-folder numbers
                                                         unread-marks
                                                         &optional same-number)
index 120640f..2524b08 100644 (file)
@@ -874,12 +874,13 @@ Return a cons cell of (NUMBER-CROSSPOSTS . NEW-MARK-ALIST).")
               nil (current-buffer)
               'unread)
              (unless (eq (buffer-size) 0)
-               (elmo-folder-append-buffer
-                folder
-                (setq unseen (member (elmo-message-mark
-                                      src-folder (car numbers))
-                                     unread-marks))
-                (if same-number (car numbers)))))
+               (setq failure (not
+                              (elmo-folder-append-buffer
+                               folder
+                               (setq unseen (member (elmo-message-mark
+                                                     src-folder (car numbers))
+                                                    unread-marks))
+                               (if same-number (car numbers)))))))
          (error (setq failure t)))
        ;; FETCH & APPEND finished
        (unless failure