/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,8 +89,6 @@ class IMAPFolder(BaseFolder):
else: else:
uid = long(options['UID']) uid = long(options['UID'])
flags = imaputil.flagsimap2maildir(options['FLAGS']) 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): def getmessagelist(self):

View File

@ -116,14 +116,6 @@ class MaildirFolder(BaseFolder):
if flagmatch: if flagmatch:
flags = [x for x in flagmatch.group(1)] flags = [x for x in flagmatch.group(1)]
flags.sort() 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, retval[uid] = {'uid': uid,
'flags': flags, 'flags': flags,
'filename': file} 'filename': file}