Apply SSL patch.
[elisp/wanderlust.git] / elmo / elmo-pipe.el
index 8989966..372ba2a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; elmo-pipe.el -- PIPE Interface for ELMO.
 
-;; Copyright 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
+;; Copyright (C) 1998,1999,2000 Yuuichi Teranishi <teranisi@gohome.org>
 
 ;; Author: Yuuichi Teranishi <teranisi@gohome.org>
 ;; Keywords: mail, net news
 (defvar elmo-pipe-drained-hook nil "A hook called when the pipe is flushed.")
 
 (defun elmo-pipe-drain (src dst)
-  (let ((msgdb (elmo-msgdb-load src))
-       elmo-nntp-use-cache
+  "Move all messages of SRC to DST."
+  (let (elmo-nntp-use-cache
        elmo-imap4-use-cache
        elmo-pop3-use-cache ; Inhibit caching while moving messages.
        elmo-pop3-use-uidl) ; No need to use UIDL
     (message "Checking %s..." src)
-    (elmo-move-msgs src (elmo-list-folder src) dst msgdb)
-    (elmo-msgdb-save src msgdb)
-    (elmo-commit src)
+    (let ((srclist (elmo-list-folder src))
+         (msgdb (elmo-msgdb-load src)))
+      (elmo-move-msgs src srclist dst msgdb)
+      ;; Don't save msgdb here.
+      ;; Because summary view of original folder is not updated yet.
+      ;; (elmo-msgdb-save src msgdb)
+      (elmo-commit src))
     (run-hooks 'elmo-pipe-drained-hook)))
 
 (defun elmo-pipe-list-folder (spec)