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
1 changed files with 1 additions and 1 deletions

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: