Remote file transfer: Fix transfer not working is custom ssh port or identity is specified on the SSH command line

Fixes #4067
This commit is contained in:
Kovid Goyal
2021-09-27 10:58:40 +05:30
parent b70064d1be
commit 3bc7b5bad9
6 changed files with 57 additions and 7 deletions

View File

@@ -649,7 +649,7 @@ class Window:
def handle_remote_file(self, netloc: str, remote_path: str) -> None:
from kittens.ssh.main import get_connection_data
args = self.child.foreground_cmdline
conn_data = get_connection_data(args)
conn_data = get_connection_data(args, self.child.foreground_cwd or self.child.current_cwd or '')
if conn_data is None:
get_boss().show_error('Could not handle remote file', 'No SSH connection data found in: {args}')
return