Merge pull request #23593 from rallytime/bp-23442

Backport #23442 to 2014.7
This commit is contained in:
Thomas S Hatch 2015-05-12 15:19:26 -06:00
commit 2c221c7332

View file

@ -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:
@ -343,7 +344,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):