Gmail folders always deleted/re-downloaded NOT synced?

Eygene Ryabinkin rea at codelabs.ru
Sun Jun 1 19:05:50 UTC 2014


Sun, Jun 01, 2014 at 01:55:58PM -0500, Tom Marble wrote:
> On 06/01/2014 12:04 PM, Eygene Ryabinkin wrote:
> > OK, what I see here is two folders that map to a single local one
> > [...]
> > So, there are 'Gmail/Associations/Breck' and '[Gmail]/Associations/Breck'.
> > Could it be so that you have both Associations/Breck as the folder and
> > as the label?  Or it is a bug in OfflineIMAP?  I can't see if you really
> > have these two inside the LIST output, since it was trimmed, thus I need
> > this information from you.
> 
> Yes BOTH appeared in the LIST output:
> 2014-06-01 12:07:40 DEBUG: [imap]:   07:40.13 imap.gmail.com reader < * LIST (\HasNoChildren) "/" "Gmail/Associations/Breck"\r\n
> 2014-06-01 12:07:40 DEBUG: [imap]:   07:40.27 imap.gmail.com reader < * LIST (\HasNoChildren) "/" "[Gmail]/Associations/Breck"\r\n

Good.  I am gonna add two folder names in the regular output
in the case of nametrans to catch such occurrences faster.

But do these two objects correspond to the different GMail
objects or they are aliases for the single one?

> So based on this I made the following changes:
> 
> def tom_folderfilter(folder):
>     if folder.find('[') >= 0: # ignore [Gmail] entries from LIST
>         return False
>     ic = ['Breck', 'CHI'] # try two folders now...
>     return functools.reduce(f_or, [folder.find(x) >= 0 for x in ic])
> 
> def tom_nametrans(folder):
>     return re.sub(r' ', r'_', folder)
> 
> def tom_reverse_nametrans(folder):
>     return re.sub(r'_', r' ', folder)
> 
> And now this seems to work (both with quick = 0 and quick = -1).

Cool!

> *Spasibo*!!!

Pozhaluista!
-- 
rea



More information about the OfflineIMAP-project mailing list