mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add directory itself to keep list
if not fixed, following sls will delete /root/a/b /root/a: file.directory: - user: root - group: root - mode: 0755 - clean: True - require: - file: /root/a/b /root/a/b: file.directory: - user: root - group: root - mode: 0755
This commit is contained in:
parent
cd34b9b6c4
commit
8814d4180e
1 changed files with 1 additions and 0 deletions
|
@ -332,6 +332,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:
|
||||
|
|
Loading…
Add table
Reference in a new issue