1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-10-26 12:43:50 +03:00

Merge pull request #9360 from Mxmilu666/master

Fix Connection error while opening WinSCP session using IPV6 address
This commit is contained in:
Eugene 2023-12-24 11:21:42 +01:00 committed by GitHub
commit 353e5a9550
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -37,7 +37,11 @@ export class SSHService {
if (password) {
uri += ':' + encodeURIComponent(password)
}
uri += `@${profile.options.host}:${profile.options.port}${cwd ?? '/'}`
if (profile.options.host.includes(':')) {
uri += `@[${profile.options.host}]:${profile.options.port}${cwd ?? '/'}`
}else {
uri += `@${profile.options.host}:${profile.options.port}${cwd ?? '/'}`
}
return uri
}