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

Commit

Permalink
BaseGitActivity: always enforce absolute URLs (#788)
Browse files Browse the repository at this point in the history
  • Loading branch information
msfjarvis authored May 24, 2020
1 parent 0c45bff commit f1befcf
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ abstract class BaseGitActivity : AppCompatActivity() {
val portPart =
if (serverPort == "22" || serverPort.isEmpty()) "" else ":$serverPort"
if (portPart.isEmpty()) {
// We only support relative paths with the standard port.
val pathPart = serverPath.trimStart('/', ':')
"$userPart$hostnamePart:$pathPart"
"$userPart$hostnamePart:$serverPath"
} else {
// Only absolute paths are supported with custom ports.
if (!serverPath.startsWith('/'))
Expand Down

0 comments on commit f1befcf

Please sign in to comment.