From c6cb0b461272818e7afeb6d20035d180309be7b0 Mon Sep 17 00:00:00 2001 From: Nikolaus Schulz Date: Wed, 9 Apr 2008 00:22:07 +0000 Subject: [PATCH] IMAP: imap_guess_mailboxnames: check for NIL delimiter. Only replace the slash with the server's hierarchy delimiter if the latter actually exists (is not NIL). --- archivemail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/archivemail.py b/archivemail.py index 9c7be1c..58eb018 100755 --- a/archivemail.py +++ b/archivemail.py @@ -1617,7 +1617,7 @@ def imap_guess_mailboxnames(srv, mailbox): vprint("IMAP namespace prefix: '%s', hierarchy delimiter: '%s'" % \ (nsprefix, hdelim)) boxnames = [nsprefix + mailbox] - if os.path.sep in mailbox: + if os.path.sep in mailbox and hdelim: mailbox = mailbox.replace(os.path.sep, hdelim) boxnames.append(mailbox) # could have a valid namespace prefix now if nsprefix: