/offlineimap/head: changeset 287

Alter handling of messages flagged for deletion -- no longer
automatically delete them if expunge is 0. In Maildir folder, we will
now ignore the T flag entirely, and just pass it back and forth with
IMAP.
This commit is contained in:
jgoerzen 2002-11-12 22:40:40 +01:00
parent 61b6c32d0f
commit 872d960fa8
2 changed files with 4 additions and 14 deletions

View File

@ -89,9 +89,7 @@ class IMAPFolder(BaseFolder):
else:
uid = long(options['UID'])
flags = imaputil.flagsimap2maildir(options['FLAGS'])
# Skip messages already flagged for deletion on the server.
if not 'T' in flags:
self.messagelist[uid] = {'uid': uid, 'flags': flags}
self.messagelist[uid] = {'uid': uid, 'flags': flags}
def getmessagelist(self):
return self.messagelist

View File

@ -116,17 +116,9 @@ class MaildirFolder(BaseFolder):
if flagmatch:
flags = [x for x in flagmatch.group(1)]
flags.sort()
if 'T' in flags:
# Message is marked for deletion; just delete it now.
# Otherwise, the T flag will be propogated to the IMAP
# server, and then expunged there, and then deleted here.
# Might as well just delete it now, to help make things
# more robust.
os.unlink(file)
else:
retval[uid] = {'uid': uid,
'flags': flags,
'filename': file}
retval[uid] = {'uid': uid,
'flags': flags,
'filename': file}
return retval
def cachemessagelist(self):