Fix fetching files with scp (#18673)
Commitec2521f
intended to fix the scp command to fetch files from a remote machine but it has src and dest swapped. This change correctly treats src as the location in the remote machine and dest as the location in the local machine. Signed-off-by: Alberto Murillo Silva <alberto.murillo.silva@intel.com> (cherry picked from commit7542dae26b
)
This commit is contained in:
parent
97444c5e59
commit
b15e1b743f
1 changed files with 1 additions and 1 deletions
|
@ -629,7 +629,7 @@ class Connection(ConnectionBase):
|
|||
in_data = u"{0} {1} {2}\n".format(sftp_action, pipes.quote(in_path), pipes.quote(out_path))
|
||||
elif method == 'scp':
|
||||
if sftp_action == 'get':
|
||||
cmd = self._build_command('scp', u'{0}:{1}'.format(host, pipes.quote(out_path)), in_path)
|
||||
cmd = self._build_command('scp', u'{0}:{1}'.format(host, pipes.quote(in_path)), out_path)
|
||||
else:
|
||||
cmd = self._build_command('scp', in_path, u'{0}:{1}'.format(host, pipes.quote(out_path)))
|
||||
in_data = None
|
||||
|
|
Loading…
Reference in a new issue