mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix file downloads on windows
this is a regression bug introduced in d70914e473
the commit removes the creation of the dest using the sanitised netloc and replaced it with a function that breaks windows downloads...
This commit is contained in:
parent
48050cd287
commit
6c2f3180c2
1 changed files with 5 additions and 5 deletions
|
@ -545,10 +545,6 @@ class Client(object):
|
|||
else:
|
||||
return ''
|
||||
elif not no_cache:
|
||||
if salt.utils.is_windows():
|
||||
netloc = salt.utils.sanitize_win_path_string(url_data.netloc)
|
||||
else:
|
||||
netloc = url_data.netloc
|
||||
dest = self._extrn_path(url, saltenv)
|
||||
destdir = os.path.dirname(dest)
|
||||
if not os.path.isdir(destdir):
|
||||
|
@ -695,12 +691,16 @@ class Client(object):
|
|||
Return the extn_filepath for a given url
|
||||
'''
|
||||
url_data = urlparse(url)
|
||||
if salt.utils.is_windows():
|
||||
netloc = salt.utils.sanitize_win_path_string(url_data.netloc)
|
||||
else:
|
||||
netloc = url_data.netloc
|
||||
|
||||
return salt.utils.path_join(
|
||||
self.opts['cachedir'],
|
||||
'extrn_files',
|
||||
saltenv,
|
||||
url_data.netloc,
|
||||
netloc,
|
||||
url_data.path
|
||||
)
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue