[patch] Fix the logic for updating maildir flags.
Rafael Ávila de Espíndola
rafael.espindola at gmail.com
Tue Dec 20 18:45:21 GMT 2011
This patch fixes the logic for updating maildir flags.
I noticed this failing when offlineimap and dovecot accessed the same
directory.
Dovecot adds lowercase flags for keywords the IMAP clients sends it, so
I had a
file that was named like
....:2,a
With the old logic, infostr would be set to infomatch.group(1) which was
':2,a'.
We would then remove the '2,[A-Z]*' leaving only the 'a'. leaving us in
the end
with a new file named
.....:a2,....
If the old flags were in [A-Z], we should completly strip them. I looks like
the code intent was to merge them. That is what this change implements. We
convert the old flags into a set and merge that with the incoming flags.
After this change, the above case produces a file named
.......:2,...a
Cheers,
Rafael
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: update_flags.patch
URL: <http://alioth-lists.debian.net/pipermail/offlineimap-project/attachments/20111220/122bb0e4/attachment-0003.ksh>
More information about the OfflineIMAP-project
mailing list