From ca24bae45d81d39d414069ae52bc62617af95b24 Mon Sep 17 00:00:00 2001 From: tkikuchi <> Date: Wed, 2 Feb 2005 01:43:21 +0000 Subject: Need a special care for scrub_nondigest list attachments. --- bin/arch | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'bin') diff --git a/bin/arch b/bin/arch index 1752b893..736fe238 100644 --- a/bin/arch +++ b/bin/arch @@ -163,7 +163,20 @@ def main(): lock.lock() # Maybe wipe the old archives if wipe: + if mlist.scrub_nondigest: + # TK: save the attachments dir because they are not in mbox + saved = 0 + try: + atchdir = os.path.join(mlist.archive_dir(), 'attachments') + savedir = os.path.join(mlist.archive_dir() + '.mbox', + 'attachments') + os.rename(atchdir, savedir) + saved = 1 + except: + pass shutil.rmtree(mlist.archive_dir()) + if mlist.scrub_nondigest and saved: + os.renames(savedir, atchdir) try: fp = open(mbox) except IOError, msg: -- cgit v1.2.3