Fix: Parsing clipboard's content for repo URI (closes #244)

This commit is contained in:
machiav3lli
2022-07-08 02:22:08 +02:00
parent 93dec1ed7a
commit 1750020e20
3 changed files with 4 additions and 3 deletions

View File

@ -66,13 +66,14 @@ data class Repository(
fun newRepository(
address: String = "",
fallbackName: String = "",
fingerprint: String = "",
authentication: String = "",
): Repository {
val name = try {
URL(address).let { "${it.host}${it.path}" }
} catch (e: Exception) {
address
fallbackName
}
return Repository(
address = address,