Skip to content

Commit

Permalink
Add support for trailing / in UrlOrLocalPath
Browse files Browse the repository at this point in the history
  • Loading branch information
kunyavskiy committed Mar 16, 2024
1 parent 49000f2 commit 66dd417
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import java.nio.file.Path
public sealed class UrlOrLocalPath {
public abstract fun subDir(s: String): UrlOrLocalPath
public class Url(public val value: String) : UrlOrLocalPath() {
public override fun subDir(s: String): UrlOrLocalPath = Url("$value/$s")
public override fun subDir(s: String): UrlOrLocalPath = Url("${value.removeSuffix("/")}/$s")
override fun toString(): String = value
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public fun getLineStreamLoaderFlow(networkSettings: NetworkSettings?, auth: Clie

is UrlOrLocalPath.Url -> {
val httpClient = defaultHttpClient(auth, networkSettings)
logger.debug("Requesting $url")
logger.info("Requesting $url")
httpClient.prepareGet(url.value) {
timeout {
socketTimeoutMillis = Long.MAX_VALUE
Expand Down

0 comments on commit 66dd417

Please sign in to comment.