Skip hidden first

This commit is contained in:
twangboy 2018-02-05 17:08:11 -07:00
parent 437a457911
commit 1282ae3a93
No known key found for this signature in database
GPG key ID: 93FF3BDEB278C9EB

View file

@ -865,13 +865,16 @@ def genrepo(**kwargs):
repo_details = _get_repo_details(saltenv)
for root, _, files in os.walk(repo_details.local_dest, followlinks=False):
short_path = os.path.relpath(root, repo_details.local_dest)
if short_path == '.':
short_path = ''
# Skip hidden directories (.git)
if re.search(r'[\\/]\..*', root):
log.debug('Skipping files in directory: {0}'.format(root))
continue
short_path = os.path.relpath(root, repo_details.local_dest)
if short_path == '.':
short_path = ''
for name in files:
if name.endswith('.sls'):
total_files_processed += 1