linamh/net-mail/mailman/files/mailman-2.1.12-directory-check.patch

33 lines
1.5 KiB
Diff
Raw Normal View History

diff -Naur mailman-2.1.12/bin/check_perms mailman-2.1.12-1/bin/check_perms
--- mailman-2.1.12/bin/check_perms 2009-02-23 22:23:35.000000000 +0100
+++ mailman-2.1.12-1/bin/check_perms 2009-08-01 11:28:56.000000000 +0200
@@ -340,6 +340,8 @@
print _('checking permissions on list data')
# BAW: This needs to be converted to the Site module abstraction
for dir in os.listdir(mm_cfg.LIST_DATA_DIR):
+ if not S_ISDIR(statmode(os.path.join(mm_cfg.LIST_DATA_DIR,dir))):
+ continue
for file in checkfiles:
path = os.path.join(mm_cfg.LIST_DATA_DIR, dir, file)
if STATE.VERBOSE:
diff -Naur mailman-2.1.12/bin/update mailman-2.1.12-1/bin/update
--- mailman-2.1.12/bin/update 2009-02-23 22:23:35.000000000 +0100
+++ mailman-2.1.12-1/bin/update 2009-08-01 11:29:19.000000000 +0200
@@ -34,6 +34,7 @@
"""
import os
+import stat
import sys
import time
import errno
@@ -431,7 +432,7 @@
# Now update for the Mailman 2.1.5 qfile format. For every filebase in
# the qfiles/* directories that has both a .pck and a .db file, pull the
# data out and re-queue them.
- for dirname in os.listdir(mm_cfg.QUEUE_DIR):
+ for dirname in [x for x in os.listdir(mm_cfg.QUEUE_DIR) if stat.S_ISDIR(os.stat(os.path.join(mm_cfg.QUEUE_DIR,x)).st_mode)]:
dirpath = os.path.join(mm_cfg.QUEUE_DIR, dirname)
if dirpath == mm_cfg.BADQUEUE_DIR:
# The files in qfiles/bad can't possibly be pickles