diff options
author | Harsh Shandilya <msfjarvis@gmail.com> | 2020-05-24 16:15:07 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-24 16:15:07 +0530 |
commit | f1befcf7f35472f6f88a9b5feea53717e386d780 (patch) | |
tree | 34b34f95797b419ed3a7f5c82db83d878f8962ca | |
parent | 0c45bffaba1192ea8a10173e709f439dbf32b089 (diff) |
BaseGitActivity: always enforce absolute URLs (#788)
-rw-r--r-- | app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt b/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt index 8ad495fa..fb7d7e82 100644 --- a/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt +++ b/app/src/main/java/com/zeapo/pwdstore/git/BaseGitActivity.kt @@ -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('/')) |