This commit is contained in:
Balakrishnan Balasubramanian 2018-12-19 02:14:31 -05:00
parent 2cacf20393
commit 5ef67e6dc9

View File

@ -154,7 +154,6 @@ def trans_command_retr(mails, req):
write(ok("Contents follow"))
write(get_mail(entry))
write(end())
drain()
else:
write(err("Not found"))
@ -207,10 +206,14 @@ async def process_transactions(mails_list: List[MailEntry]):
async def transaction_stage(deleted_items_path: Path):
if deleted_items_path.exists():
with deleted_items_path.open() as f:
deleted_items = set(f.read().splitlines())
else:
deleted_items = set()
mails_list = [entry for entry in get_mails_list(Session.mails_path / 'new') if entry.uid not in deleted_items]
return await process_transactions(mails_list)