aboutsummaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authortkikuchi <>2005-02-02 01:43:21 +0000
committertkikuchi <>2005-02-02 01:43:21 +0000
commitca24bae45d81d39d414069ae52bc62617af95b24 (patch)
tree8f142bf03612e7b0d5bee3c22a2d1eb39da7bab7 /bin
parentfcd7cf81cb95874d65506fdab6557a3a5c1b50d9 (diff)
downloadmailman2-ca24bae45d81d39d414069ae52bc62617af95b24.tar.gz
mailman2-ca24bae45d81d39d414069ae52bc62617af95b24.tar.xz
mailman2-ca24bae45d81d39d414069ae52bc62617af95b24.zip
Need a special care for scrub_nondigest list attachments.
Diffstat (limited to '')
-rw-r--r--bin/arch13
1 files changed, 13 insertions, 0 deletions
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: