imapclient icon indicating copy to clipboard operation
imapclient copied to clipboard

folder_status workaround for imaplib bug with folders that contain special characters

Open mjs opened this issue 10 years ago • 2 comments

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

mjs avatar Jul 01 '15 05:07 mjs

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)

mjs avatar Nov 23 '15 23:11 mjs

Original comment by tomst (Bitbucket: tomst):


Any thoughts on this? @mjs0

mjs avatar Nov 13 '15 05:11 mjs