diff --git a/salt/states/file.py b/salt/states/file.py index eb37b343b1..ddcaded627 100644 --- a/salt/states/file.py +++ b/salt/states/file.py @@ -349,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 comp['file'] in (low['__id__'], low['name']): fn = low['name'] if os.path.isdir(comp['file']): if _is_child(comp['file'], name):