mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
parent
158c1ca575
commit
2badd7f78f
1 changed files with 5 additions and 3 deletions
|
@ -187,12 +187,14 @@ def generate_mtime_map(opts, path_map):
|
|||
file_map = {}
|
||||
for saltenv, path_list in six.iteritems(path_map):
|
||||
for path in path_list:
|
||||
for directory, dirnames, filenames in salt.utils.path.os_walk(path):
|
||||
# Don't walk any directories that match file_ignore_regex or glob
|
||||
dirnames[:] = [d for d in dirnames if not is_file_ignored(opts, d)]
|
||||
for directory, _, filenames in salt.utils.path.os_walk(path):
|
||||
for item in filenames:
|
||||
try:
|
||||
file_path = os.path.join(directory, item)
|
||||
# Don't walk any directories that match
|
||||
# file_ignore_regex or glob
|
||||
if is_file_ignored(opts, file_path):
|
||||
continue
|
||||
file_map[file_path] = os.path.getmtime(file_path)
|
||||
except (OSError, IOError):
|
||||
# skip dangling symlinks
|
||||
|
|
Loading…
Add table
Reference in a new issue