Update of /cvsroot/mailman/mailman/bin
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7973

Modified Files:
      Tag: Release_2_1-maint
        arch 
Log Message:
Need a special care for scrub_nondigest list attachments.


Index: arch
===================================================================
RCS file: /cvsroot/mailman/mailman/bin/arch,v
retrieving revision 2.12.2.1
retrieving revision 2.12.2.2
diff -u -d -r2.12.2.1 -r2.12.2.2
--- arch        7 Apr 2003 22:51:17 -0000       2.12.2.1
+++ arch        2 Feb 2005 01:43:21 -0000       2.12.2.2
@@ -163,7 +163,20 @@
         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:

_______________________________________________
Mailman-checkins mailing list
[email protected]
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-checkins/archive%40jab.org

Reply via email to