mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #31093 from techhat/spmfix
Ensure double directories don't get created
This commit is contained in:
commit
94fa76831f
1 changed files with 6 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue