mirror of
https://github.com/valitydev/salt.git
synced 2024-11-08 01:18:58 +00:00
Ensure double directories don't get created
This commit is contained in:
parent
5dcaa8d387
commit
4f4c8877ad
@ -106,6 +106,12 @@ def install_file(package, formula_tar, member, formula_def, conn=None):
|
||||
# Reactor files go into /srv/reactor/
|
||||
out_path = __opts__['reactor_path']
|
||||
|
||||
# This ensures that double directories (i.e., apache/apache/) don't
|
||||
# get created
|
||||
comps = member.path.split('/')
|
||||
if len(comps) > 1 and comps[0] == comps[1]:
|
||||
member.path = '/'.join(comps[1:])
|
||||
|
||||
log.debug('Installing package file {0} to {1}'.format(member.name, out_path))
|
||||
formula_tar.extract(member, out_path)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user