Skip to content
This repository was archived by the owner on Oct 15, 2024. It is now read-only.

Commit f1befcf

Browse files
authored
BaseGitActivity: always enforce absolute URLs (#788)
1 parent 0c45bff commit f1befcf

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ abstract class BaseGitActivity : AppCompatActivity() {
113113
val portPart =
114114
if (serverPort == "22" || serverPort.isEmpty()) "" else ":$serverPort"
115115
if (portPart.isEmpty()) {
116-
// We only support relative paths with the standard port.
117-
val pathPart = serverPath.trimStart('/', ':')
118-
"$userPart$hostnamePart:$pathPart"
116+
"$userPart$hostnamePart:$serverPath"
119117
} else {
120118
// Only absolute paths are supported with custom ports.
121119
if (!serverPath.startsWith('/'))

0 commit comments

Comments
 (0)