mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
Merge pull request #23442 from clan/file_directory_require
add directory itself to keep list
This commit is contained in:
commit
57f6c72843
@ -337,6 +337,7 @@ def _gen_keep_files(name, require):
|
||||
ret = set()
|
||||
if os.path.isdir(name):
|
||||
for root, dirs, files in os.walk(name):
|
||||
ret.add(name)
|
||||
for name in files:
|
||||
ret.add(os.path.join(root, name))
|
||||
for name in dirs:
|
||||
@ -348,7 +349,7 @@ def _gen_keep_files(name, require):
|
||||
required_files = [comp for comp in require if 'file' in comp]
|
||||
for comp in required_files:
|
||||
for low in __lowstate__:
|
||||
if low['__id__'] == comp['file']:
|
||||
if low['name'] == comp['file']:
|
||||
fn = low['name']
|
||||
if os.path.isdir(comp['file']):
|
||||
if _is_child(comp['file'], name):
|
||||
|
Loading…
Reference in New Issue
Block a user