kdeldycke/mail-deduplicate

Confirm non-existence of export mailbox before hashing mails

Closed this issue · 6 comments

mdedup wants to create a new mailbox in the location specified by --export, and if the location exists a FileExistsError is raised by create_box.

Because this comes after the mail has been hashed, and the hashing is the time-consuming part of the process, one ends up having to re-hash if the mailbox already exists. Although it is a user error, it is annoying to have to re-hash.

So it would be nice if mdedup could check that the export destination doesn't exist, and throw the exception if it does, before the hashing takes place.

Ah yes, you're right. Totally makes sense. The current implementation is quite naive indeed. Shouldn't be that hard to fix. I'll put that on my todo list.

Just implemented that upstream. Should be part of the next release.

v6.0.1 has just been released with this change.

Great, thanks for getting to it so quickly! I've been cleaning up more than a decade of emails, really appreciating mdedup

A journey which started 10 years ago! 😄

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.