* elmo-pipe.el (elmo-folder-open-internal): Check plugged before
authorhmurata <hmurata>
Tue, 22 May 2001 00:19:56 +0000 (00:19 +0000)
committerhmurata <hmurata>
Tue, 22 May 2001 00:19:56 +0000 (00:19 +0000)
call `elmo-pipe-drain'.

elmo/ChangeLog
elmo/elmo-pipe.el

index 5c690d8..38196c1 100644 (file)
@@ -1,3 +1,8 @@
+2001-05-22  Hiroya Murata  <lapis-lazuli@pop06.odn.ne.jp>
+
+       * elmo-pipe.el (elmo-folder-open-internal): Check plugged before
+       call `elmo-pipe-drain'.
+
 2001-05-19  Masahiro MURATA  <muse@ba2.so-net.ne.jp>
 
        * elmo-mark.el (elmo-message-fetch-with-cache-process): Fixed
index 82cda99..b5d9237 100644 (file)
 
 (luna-define-method elmo-folder-open-internal ((folder elmo-pipe-folder))
   (elmo-folder-open-internal (elmo-pipe-folder-dst-internal folder))
-  (elmo-pipe-drain (elmo-pipe-folder-src-internal folder)
-                  (elmo-pipe-folder-dst-internal folder)))
+  (let ((src-folder (elmo-pipe-folder-src-internal folder))
+       (dst-folder (elmo-pipe-folder-dst-internal folder)))
+    (when (and (elmo-folder-plugged-p src-folder)
+              (elmo-folder-plugged-p dst-folder))
+      (elmo-pipe-drain src-folder dst-folder))))
 
 (luna-define-method elmo-folder-close-internal ((folder elmo-pipe-folder))
   (elmo-folder-close-internal(elmo-pipe-folder-dst-internal folder)))