Compare commits

...

2 commits

Author SHA1 Message Date
Vasiliy Gokoyev
7aff9810ad
Merge 12ecc3823b into 12a1c25f5e 2023-07-07 23:19:45 +01:00
k3it
12ecc3823b maintain proper formating of the remote paths when defined as user@host:/... or host:/...
fixes #360
2022-05-14 15:16:03 -04:00

View file

@ -77,7 +77,14 @@ class ActionModule(ActionBase):
if self._host_is_ipv6_address(host):
return '[%s%s]:%s' % (user_prefix, host, path)
return '%s%s:%s' % (user_prefix, host, path)
#preserve formatting of remote paths if host or user@host is explicitly defined in the path
if ':' not in path:
return '%s%s:%s' % (user_prefix, host, path)
elif '@' not in path:
return '%s%s' % (user_prefix, path)
else:
return path
def _process_origin(self, host, path, user):