Fix bug: when fetching MIME message part, must guarantee that the
authorChris Hanson <org/chris-hanson/cph>
Mon, 19 Jun 2000 20:45:21 +0000 (20:45 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 19 Jun 2000 20:45:21 +0000 (20:45 +0000)
connection is open.

v7/src/imail/imail-imap.scm

index 9ff3ffeef3eb9918c80de6545f3fbca776d46292..a97a5628653760d917d2d31f340f9dc7cddc185a 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;; $Id: imail-imap.scm,v 1.122 2000/06/19 05:00:50 cph Exp $
+;;; $Id: imail-imap.scm,v 1.123 2000/06/19 20:45:21 cph Exp $
 ;;;
 ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology
 ;;;
       (lambda ()
        (imap:read-literal-progress-hook imail-ui:progress-meter
          (lambda ()
-           (imap:command:uid-fetch
-            (imap-folder-connection (message-folder message))
-            (imap-message-uid message)
-            `(',(string-append "body["
-                               (decorated-string-append
-                                "" "." ""
-                                (map (lambda (x)
-                                       (if (exact-nonnegative-integer? x)
-                                           (number->string x)
-                                           (symbol->string x)))
-                                     section))
-                               "]"))))))))
+           (with-imap-message-open message
+             (lambda (connection)
+               (imap:command:uid-fetch
+                connection
+                (imap-message-uid message)
+                `(',(string-append "body["
+                                   (decorated-string-append
+                                    "" "." ""
+                                    (map (lambda (x)
+                                           (if (exact-nonnegative-integer? x)
+                                               (number->string x)
+                                               (symbol->string x)))
+                                         section))
+                                   "]"))))))))))
    section
    #f))
 \f