From 6e9e2569460b8913a59ba53f1bcc43fc7cd086ed Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Sat, 7 Jan 2012 22:00:45 +0100 Subject: [PATCH] Ignore lower-case custom Maildir flags Do not read in custom maildir flags, or we would try to sync them over the wire. The next step will be to merge flag writes with existing custom flags, so we don't lose information. The long term goal will be to attempt to sync flags to the other side, of course. Signed-off-by: Sebastian Spaeth --- offlineimap/folder/Maildir.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/offlineimap/folder/Maildir.py b/offlineimap/folder/Maildir.py index 714636d..95258d9 100644 --- a/offlineimap/folder/Maildir.py +++ b/offlineimap/folder/Maildir.py @@ -138,7 +138,9 @@ class MaildirFolder(BaseFolder): uid = long(uidmatch.group(1)) flagmatch = self.re_flagmatch.search(filename) if flagmatch: - flags = set(flagmatch.group(1)) + # Filter out all lowercase (custom maildir) flags. We don't + # handle them yet. + flags = set((c for c in flagmatch.group(1) if not c.islower())) return prefix, uid, fmd5, flags def _scanfolder(self):