BaseGitActivity: always enforce absolute URLs (#788)
This commit is contained in:
parent
0c45bffaba
commit
f1befcf7f3
1 changed files with 1 additions and 3 deletions
|
@ -113,9 +113,7 @@ abstract class BaseGitActivity : AppCompatActivity() {
|
||||||
val portPart =
|
val portPart =
|
||||||
if (serverPort == "22" || serverPort.isEmpty()) "" else ":$serverPort"
|
if (serverPort == "22" || serverPort.isEmpty()) "" else ":$serverPort"
|
||||||
if (portPart.isEmpty()) {
|
if (portPart.isEmpty()) {
|
||||||
// We only support relative paths with the standard port.
|
"$userPart$hostnamePart:$serverPath"
|
||||||
val pathPart = serverPath.trimStart('/', ':')
|
|
||||||
"$userPart$hostnamePart:$pathPart"
|
|
||||||
} else {
|
} else {
|
||||||
// Only absolute paths are supported with custom ports.
|
// Only absolute paths are supported with custom ports.
|
||||||
if (!serverPath.startsWith('/'))
|
if (!serverPath.startsWith('/'))
|
||||||
|
|
Loading…
Reference in a new issue