Check error.
[elisp/wanderlust.git] / elmo / elmo-archive.el
index 7a888be..fe7a2b8 100644 (file)
@@ -447,7 +447,7 @@ TYPE specifies the archiver's symbol."
             (delete-file dummy)))
        ))))
 
-(luna-define-method elmo-folder-delete ((folder elmo-archive-folder))
+(luna-define-method elmo-folder-delete :before ((folder elmo-archive-folder))
   (let ((arc (elmo-archive-get-archive-name folder)))
     (if (not (file-exists-p arc))
        (error "No such file: %s" arc)
@@ -551,11 +551,12 @@ TYPE specifies the archiver's symbol."
         (method (elmo-archive-get-method type 'cat))
         (args (list arc (elmo-concat-path
                          prefix (int-to-string number)))))
-    (when (file-exists-p arc)
-      (and
-       (as-binary-process
-       (elmo-archive-call-method method args t))
-       (elmo-delete-cr-buffer)))))
+    (and (file-exists-p arc)
+        (as-binary-process
+         (elmo-archive-call-method method args t))
+        (progn
+          (elmo-delete-cr-buffer)
+          t))))
 
 (luna-define-method elmo-message-fetch-internal ((folder elmo-archive-folder)
                                                 number strategy