1
0
Fork 0
mirror of https://git.code.sf.net/p/archivemail/code synced 2025-03-11 23:32:48 +00:00

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).
This commit is contained in:
Nikolaus Schulz 2008-04-09 00:22:07 +00:00
parent 415e055a6e
commit c6cb0b4612

View file

@ -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: