diff --git a/roundup/init.py b/roundup/init.py
index 8506f22aefee3dbc20dfd435d5391e1a93dd2a7b..d4afecc9e8a50da5e33c7fc7d0dee6a3ff4e6918 100644 (file)
--- a/roundup/init.py
+++ b/roundup/init.py
def copytree(src, dst, symlinks=0):
"""Recursively copy a directory tree using copyDigestedFile().
- The destination directory os allowed to exist.
+ The destination directory is allowed to exist.
If the optional symlinks flag is true, symbolic links in the
source tree result in symbolic links in the destination tree; if
This was copied from shutil.py in std lib.
"""
- names = os.listdir(src)
+
+ # Prevent 'hidden' files (those starting with '.') from being considered.
+ names = [f for f in os.listdir(src) if not f.startswith('.')]
try:
os.mkdir(dst)
except OSError, error:
finally:
f.close()
-def write_select_db(instance_home, backend):
+def write_select_db(instance_home, backend, dbdir = 'db'):
''' Write the file that selects the backend for the tracker
'''
- dbdir = os.path.join(instance_home, 'db')
+ # dbdir may be a relative pathname, os.path.join does the right
+ # thing when the second component of a join is an absolute path
+ dbdir = os.path.join (instance_home, dbdir)
if not os.path.exists(dbdir):
os.makedirs(dbdir)
f = open(os.path.join(dbdir, 'backend_name'), 'w')