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
parent 42b0d27f71
commit 3f9309521b
No known key found for this signature in database
GPG key ID: 5E5583C437808F3F

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)