From 6a29258c1a714b059a2623a833fdf5a968ac9546 Mon Sep 17 00:00:00 2001 From: "Taylor R. Campbell" Date: Sun, 5 Aug 2007 23:57:30 +0000 Subject: [PATCH] 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. --- v7/src/imail/imail-imap.scm | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) 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) -- 2.25.1