From e86adb0921966cc6ea31182e44915395e2798abe Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 18 May 2001 20:03:09 +0000 Subject: [PATCH] Change IMAP-URL-SERVER-MAILBOX to accept container URLs and strip the trailing delimiter off of them. --- v7/src/imail/imail-imap.scm | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/v7/src/imail/imail-imap.scm b/v7/src/imail/imail-imap.scm index 5b16ab4d1..dbde01bef 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.153 2001/05/17 04:37:39 cph Exp $ +;;; $Id: imail-imap.scm,v 1.154 2001/05/18 20:03:09 cph Exp $ ;;; ;;; Copyright (c) 1999-2001 Massachusetts Institute of Technology ;;; @@ -310,7 +310,12 @@ ;;;; URL->server delimiter conversion (define (imap-url-server-mailbox url) - (imap-mailbox/url->server url (imap-url-mailbox url))) + (imap-mailbox/url->server + url + (let ((mailbox (imap-url-mailbox url))) + (if (string-suffix? "/" mailbox) + (string-head mailbox (fix:- (string-length mailbox) 1)) + mailbox)))) (define (imap-mailbox/url->server url mailbox) (let ((delimiter (imap-mailbox-delimiter url mailbox))) @@ -1239,7 +1244,7 @@ (error "Unable to perform rename between different IMAP accounts:" url new-url))) -(define-method %append-message ((message ) (url )) +(define-method %append-message ((message ) (url )) (let ((folder (message-folder message)) (maybe-create (lambda (connection thunk) -- 2.25.1