]> granicus.if.org Git - neomutt/commit
Fix double-decode during IMAP browse.
authorKevin McCarthy <kevin@8t8.us>
Sun, 6 Sep 2015 23:31:57 +0000 (16:31 -0700)
committerKevin McCarthy <kevin@8t8.us>
Sun, 6 Sep 2015 23:31:57 +0000 (16:31 -0700)
commitfa1efd141be72be74839a8869c4eaea19fc94bab
tree0cbea8df530d3a9e04ca8a36d808afd9657c6d39
parent271b2450b85765602299ca7870dda1b21d96fae4
Fix double-decode during IMAP browse.

cmd_parse_list() already calls imap_unmunge_mbox_name() on the mailbox
names returned from the server.  However, browse_add_list_result() was
taking those mailbox names and passing them to imap_add_folder(), which
was calling imap_unmunge_mbox_name() yet again.

The reason is that imap_browse() was directly calling imap_add_folder()
too, passing in a previously encoded "mbox" name.  After looking
carefully at the code, I could find no reason that mbox needed to
be encoded outside of the LIST commands..  Therefore I changed
imap_browse() to call imap_munge_mbox_name() on mbox for the
two LIST commands generated from it instead, and removed the
imap_unmunge_mbox_name() call inside imap_add_folder().
imap/browse.c