diff options
author | tkikuchi <> | 2005-02-02 01:43:21 +0000 |
---|---|---|
committer | tkikuchi <> | 2005-02-02 01:43:21 +0000 |
commit | ca24bae45d81d39d414069ae52bc62617af95b24 (patch) | |
tree | 8f142bf03612e7b0d5bee3c22a2d1eb39da7bab7 /bin/arch | |
parent | fcd7cf81cb95874d65506fdab6557a3a5c1b50d9 (diff) | |
download | mailman2-ca24bae45d81d39d414069ae52bc62617af95b24.tar.gz mailman2-ca24bae45d81d39d414069ae52bc62617af95b24.tar.xz mailman2-ca24bae45d81d39d414069ae52bc62617af95b24.zip |
Need a special care for scrub_nondigest list attachments.
Diffstat (limited to 'bin/arch')
-rw-r--r-- | bin/arch | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -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: |