mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Skip hidden first
This commit is contained in:
parent
437a457911
commit
1282ae3a93
1 changed files with 6 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue