From: Taylor R. Campbell Date: Sun, 5 Aug 2007 23:57:30 +0000 (+0000) Subject: Handle an empty selector in WRITE-MIME-MESSAGE-BODY-PART on IMAP X-Git-Tag: 20090517-FFI~474 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=6a29258c1a714b059a2623a833fdf5a968ac9546;p=mit-scheme.git Handle an empty selector in WRITE-MIME-MESSAGE-BODY-PART on IMAP messages by interpreting it as a selector of (TEXT). This lets IMAIL save MIME entities that the whole message comprises, such as S/MIME application/pkcs7-mime messages. --- diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index d8f51178d..93c6a0304 100644 --- a/v7/src/imail/imail-imap.scm +++ b/v7/src/imail/imail-imap.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: imail-imap.scm,v 1.212 2007/04/05 03:23:22 riastradh Exp $ +$Id: imail-imap.scm,v 1.213 2007/08/05 23:57:30 riastradh Exp $ Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, @@ -1253,11 +1253,13 @@ USA. (define-method write-mime-message-body-part ((message ) selector cache? port) (let ((section - (map (lambda (x) - (if (exact-nonnegative-integer? x) - (+ x 1) - x)) - selector))) + (if (pair? selector) + (map (lambda (x) + (if (exact-nonnegative-integer? x) + (+ x 1) + x)) + selector) + '(TEXT)))) (let ((entry (list-search-positive (imap-message-body-parts message) (lambda (entry)