workaround for imaputil.imapsplit failure on gmail folders with quotes in the name
Sebastian at SSpaeth.de
Sat Jan 7 01:49:19 GMT 2012
On Thu, 22 Dec 2011 03:28:29 +0000, Mark Eichin <eichin at gmail.com> wrote:
> offlineimap/repository/IMAP.py IMAPRepository.getfolders does a flags,
> delim, name = imaputil.imapsplit(string) on the individual results of
> a listfunction call. Turns out I have a couple of folders with quotes
> (0x22) in the folder name (but not around the entire thing); imapsplit
> mishandles this - the quotes are backslashed by the time it sees them,
> but it doesn't deal with that, and so it returns an extra field which
> should be part of the name.
> An example folder name of this form is: "Make" Magazine (ORA)
> I have a few others as well.
Uhh, ohh, interesting. So far I have been able to avoid that imapsplit
function as it deals with the intricacies of the IMAP response format.
But clearly we want to support folder names with " in them. I have to
say that I need to look more in detail in your fix, it looks a bit hacky
to me ;-).
https://github.com/spaetz/offlineimap/issues/9 to track this.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 197 bytes
Desc: not available
More information about the OfflineIMAP-project