Fixed clone url replacing inbetween ".git" string (should only remove suffixes)
This commit is contained in:
parent
c1fdd891c6
commit
11ea0986c3
@ -47,7 +47,11 @@ class CloneViewModel @Inject constructor(
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Take the last element of the path/URL to generate obtain the repo name
|
// Take the last element of the path/URL to generate obtain the repo name
|
||||||
val repoName = urlSplit.lastOrNull()?.replace(".git", "")
|
var repoName = urlSplit.lastOrNull()
|
||||||
|
|
||||||
|
if(repoName?.endsWith(".git") == true) {
|
||||||
|
repoName = repoName.removeSuffix(".git")
|
||||||
|
}
|
||||||
|
|
||||||
if (repoName.isNullOrBlank()) {
|
if (repoName.isNullOrBlank()) {
|
||||||
_cloneStatus.value = CloneStatus.Fail("Check your URL and try again")
|
_cloneStatus.value = CloneStatus.Fail("Check your URL and try again")
|
||||||
|
Loading…
Reference in New Issue
Block a user