From e001633d3463ccb05dafae5ee9e27bdd475f513d Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 24 May 2001 19:03:52 +0000 Subject: [PATCH] Fix CONTAINER-URL-CONTENTS to return container URLs when appropriate. --- v7/src/imail/imail-imap.scm | 41 ++++++++++++------------------------- 1 file changed, 13 insertions(+), 28 deletions(-) diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index b81b7b9fc..e4f25b9c4 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.160 2001/05/24 17:46:47 cph Exp $ +;;; $Id: imail-imap.scm,v 1.161 2001/05/24 19:03:52 cph Exp $ ;;; ;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology ;;; @@ -219,24 +219,8 @@ prefix))))))) (define-method container-url-contents ((url )) - (with-open-imap-connection url - (lambda (connection) - (map (lambda (response) - (imap-url-new-mailbox - url - (let ((delimiter (imap:response:list-delimiter response)) - (mailbox - (imap:decode-mailbox-name - (imap:response:list-mailbox response)))) - (if delimiter - (string-replace mailbox (string-ref delimiter 0) #\/) - mailbox)))) - (imap:command:list - connection - "" - (string-append (imap-mailbox/url->server url - (imap-url-mailbox url)) - "%")))))) + (map (lambda (mailbox) (imap-url-new-mailbox url mailbox)) + (imap-mailbox-completions (imap-url-mailbox url) url))) ;;;; Completion @@ -296,15 +280,16 @@ (mailbox (imap:decode-mailbox-name (imap:response:list-mailbox response)))) - (let ((mailbox - (if delimiter - (string-replace mailbox (string-ref delimiter 0) #\/) - mailbox))) - (if (and delimiter - (memq '\NOSELECT flags) - (not (memq '\NOINFERIORS flags))) - (string-append mailbox "/") - mailbox)))) + (if delimiter + (let ((mailbox + (string-replace mailbox + (string-ref delimiter 0) + #\/))) + (if (and (memq '\NOSELECT flags) + (not (memq '\NOINFERIORS flags))) + (string-append mailbox "/") + mailbox)) + mailbox))) (imap:command:list connection "" -- 2.25.1