folder_status workaround for imaplib bug with folders that contain special characters
Originally reported by: tomst (Bitbucket: tomst)
This patch fixes calling folder_status on IMAP folders containing a quote (e.g. Nylas uses this on accounts with condstore enabled).
https://github.com/closeio/imapclient/commit/35459e1d6aeca9a99f1d541892989d31d0f1b72c
https://github.com/closeio/imapclient/commit/b9c12026fc61da29b5ddf9122faf6c6c5b09667d
Maybe there's a better / less-hacky way to do it?
- Bitbucket: https://bitbucket.org/mjs0/imapclient/issue/158
Original comment by Menno Smits (Bitbucket: mjs0):
Thanks for this. I'm having a hard time reproducing the problem this is trying to solve with IMAPClient's current tip. I've tried folder_status() with Python 2.6, 2.7 and 3.4 using mailbox names like: "foo bar", "foo'bar" and "foo\"bar" and didn't see a problem.
Can you provide more detail on what imaplib does wrong here? Is it triggered by the responses returned by specific servers? (I was testing with Dovecot)