From f1f34ca46e9ea81e85d6728cb7c74cb815860cca Mon Sep 17 00:00:00 2001 From: Nikolaus Schulz Date: Sat, 31 Jul 2010 15:35:31 +0200 Subject: Don't create hidden archives when archiving mailboxes with leading dots in the name When archiving a mailbox with leading dots in the name and no archive name prefix specified, strip the dots off the archive name. This is targeting Maildir++ subfolders. --- archivemail | 3 +++ 1 file changed, 3 insertions(+) (limited to 'archivemail') diff --git a/archivemail b/archivemail index 2ca862f..92faa2a 100755 --- a/archivemail +++ b/archivemail @@ -1649,6 +1649,9 @@ def make_archive_name(mailbox_name): archive_base = mailbox_name.rsplit('/', 1)[-1] else: archive_dir, archive_base = os.path.split(mailbox_name) + if not prefix: + # Don't create hidden archives, e.g. when processing Maildir++ subfolders + archive_base = archive_base.lstrip('.') if options.output_dir: archive_dir = options.output_dir archive_name = os.path.join(archive_dir, prefix + archive_base + suffix) -- cgit v1.2.3