def CheckHTMLArchiveDir(self): # We need to make sure that the archive directory has the right perms # for public vs private. If it doesn't exist, or some weird # permissions errors prevent us from stating the directory, it's # pointless to try to fix the perms, so we just return -scott if mm_cfg.ARCHIVE_TO_MBOX == -1: # Archiving is completely disabled, don't require the skeleton. return pubdir = Site.get_archpath(self.internal_name(), public=True) privdir = self.archive_dir() pubmbox = pubdir + '.mbox' privmbox = privdir + '.mbox' if self.archive_private: breaklink(pubdir) breaklink(pubmbox) else: # BAW: privdir or privmbox could be nonexistant. We'd get an # OSError, ENOENT which should be caught and reported properly. makelink(privdir, pubdir) # Only make this link if the site has enabled public mbox files if mm_cfg.PUBLIC_MBOX: makelink(privmbox, pubmbox)
oldmlist = MailList.MailList(oldlistname) if not oldmlist.Locked(): oldmlist.Lock() oldlistpath = Site.get_listpath(oldlistname) lists_path = os.path.dirname(oldlistpath) newlistpath = lists_path + '/' + newlistname os.rename(oldlistpath, newlistpath) if verbose: print 'Assing archives of list %s to %s.' % (oldlistname, newlistname) oldarchdir = Site.get_archpath(oldlistname) arch_dir = os.path.dirname(oldarchdir) newarchdir = arch_dir + '/' + newlistname oldmbox = arch_dir + '/' + oldlistname + '.mbox' newmbox = arch_dir + '/' + newlistname + '.mbox' oldmbox_mbox = newmbox + '/' + oldlistname + '.mbox' newmbox_mbox = newmbox + '/' + newlistname + '.mbox' os.rename(oldarchdir, newarchdir) os.rename(oldmbox, newmbox) if os.path.isfile(oldmbox_mbox): os.rename(oldmbox_mbox, newmbox_mbox) cmd = DEF_PATH + 'bin/arch --wipe ' + newlistname
def archive_dir(self): return Site.get_archpath(self.internal_name())