workaround for imaputil.imapsplit failure on gmail folders with quotes in the name

Sebastian Spaeth Sebastian at SSpaeth.de
Fri Jan 20 10:47:37 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.

Hi Mark, I have examined the issue, and reworked the regex that is
responsible for catching these things.

The fixed version has been pushed to the master branch in my git
repo. Alternatively grab
https://github.com/downloads/spaetz/offlineimap/offlineimap-v6.5.2.1-rc1.tar.gz

It would be great if you could verify that things work now.

Sebastian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20120120/ba5a10a7/attachment-0001.sig>


More information about the OfflineIMAP-project mailing list