From 32ca20d0da97b2ed2b377c06f12f4365af37538c Mon Sep 17 00:00:00 2001 From: Sebastian Spaeth Date: Tue, 30 Aug 2011 11:19:53 +0200 Subject: [PATCH] Folder.Maildir: No need to store 'uid' in messagelist dict. The Message UID is already the key to self.messagelist, so we have that information. It is redundant to save the UID again as self.messagelist[uid]{'uid': uid} and we never made use of the information anyway. The same thing should be done with the other 2 backends. Signed-off-by: Sebastian Spaeth --- offlineimap/folder/Maildir.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/offlineimap/folder/Maildir.py b/offlineimap/folder/Maildir.py index cd3da7d..df5dd2e 100644 --- a/offlineimap/folder/Maildir.py +++ b/offlineimap/folder/Maildir.py @@ -165,10 +165,8 @@ class MaildirFolder(BaseFolder): flags = set(flagmatch.group(1)) else: flags = set() - # 'filename' is 'dirannex/filename', e.g. cur/123_U=1_FMD5=1:2,S - retval[uid] = {'uid': uid, - 'flags': flags, - 'filename': file} + # 'filename' is 'dirannex/filename', e.g. cur/123,U=1,FMD5=1:2,S + retval[uid] = {'flags': flags, 'filename': file} return retval def quickchanged(self, statusfolder): @@ -255,7 +253,7 @@ class MaildirFolder(BaseFolder): if rtime != None: os.utime(os.path.join(tmpdir, messagename), (rtime, rtime)) - self.messagelist[uid] = {'uid': uid, 'flags': set(), + self.messagelist[uid] = {'flags': set(), 'filename': os.path.join('tmp', messagename)} # savemessageflags moves msg to 'cur' or 'new' as appropriate self.savemessageflags(uid, flags)