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

Mark Eichin eichin at gmail.com
Tue Jan 24 06:04:32 UTC 2012


Tested it and it looks like it worked fine.  Thanks!

On Fri, Jan 20, 2012 at 10:47 AM, Sebastian Spaeth <Sebastian at sspaeth.de> wrote:
> 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



-- 
_Mark_ <eichin at thok.org> <eichin at gmail.com>



More information about the OfflineIMAP-project mailing list