When makecatalogs and manifestutil recurse into repo directories, don't enter directories whose names start with a period. Prevents looking into .git and .svn directories.

This commit is contained in:
Greg Neagle
2012-02-23 15:18:06 -08:00
parent 6804a86fb9
commit ee07c2be86
2 changed files with 10 additions and 1 deletions

View File

@@ -93,7 +93,11 @@ def makecatalogs(repopath):
catalogs = {}
catalogs['all'] = []
for dirpath, unused_dirnames, filenames in os.walk(pkgsinfopath):
#subdir = dirpath[len(pkgsinfopath):]
for dirname in dirnames:
# don't recurse into directories that start
# with a period.
if dirname.startswith('.'):
dirnames.remove(dirname)
for name in filenames:
if name.startswith("._") or name == ".DS_Store":
# don't process these

View File

@@ -76,6 +76,11 @@ def getManifestNames():
manifests_path = os.path.join(pref('repo_path'), 'manifests')
manifests = []
for dirpath, dirnames, filenames in os.walk(manifests_path):
for dirname in dirnames:
# don't recurse into directories that start
# with a period.
if dirname.startswith('.'):
dirnames.remove(dirname)
subdir = dirpath[len(manifests_path):]
for name in filenames:
if name.startswith("."):