mirror of
https://github.com/munki/munki.git
synced 2026-01-22 07:00:34 -06:00
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:
@@ -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
|
||||
|
||||
@@ -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("."):
|
||||
|
||||
Reference in New Issue
Block a user