Fix bug affecting salt-ssh when root_dir differs from the default

H/T https://github.com/saltstack/salt/issues/44957#issuecomment-356122811
This commit is contained in:
Erik Johnson 2018-01-22 08:58:52 -06:00 committed by rallytime
parent ced3269ae8
commit d52d96f30a
No known key found for this signature in database
GPG Key ID: E8F1A4B90D0DEA19

View File

@ -205,7 +205,7 @@ def prep_trans_tar(opts, file_client, chunks, file_refs, pillar=None, id_=None):
os.makedirs(env_root)
for ref in file_refs[saltenv]:
for name in ref:
short = salt.utils.url.parse(name)[0]
short = salt.utils.url.parse(name)[0].lstrip('/')
cache_dest = os.path.join(cache_dest_root, short)
try:
path = file_client.cache_file(name, saltenv, cachedir=cachedir)