From 4da7880bb30c1d73c8cbcb63516b337c95350104 Mon Sep 17 00:00:00 2001 From: kunfei Date: Thu, 23 Jun 2022 10:24:55 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/lib/webdav/WebDav.kt | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/webdav/WebDav.kt b/app/src/main/java/io/legado/app/lib/webdav/WebDav.kt index 9489a350a..c0bd46423 100644 --- a/app/src/main/java/io/legado/app/lib/webdav/WebDav.kt +++ b/app/src/main/java/io/legado/app/lib/webdav/WebDav.kt @@ -25,7 +25,7 @@ import java.time.ZoneOffset import java.time.format.DateTimeFormatter @Suppress("unused", "MemberVisibilityCanBePrivate") -open class WebDav(urlStr: String, val authorization: Authorization) { +open class WebDav(val path: String, val authorization: Authorization) { companion object { @SuppressLint("DateTimeFormatter") @@ -47,7 +47,7 @@ open class WebDav(urlStr: String, val authorization: Authorization) { """ } - private val url: URL = URL(urlStr) + private val url: URL = URL(path) private val httpUrl: String? by lazy { val raw = url.toString().replace("davs://", "https://").replace("dav://", "http://") return@lazy kotlin.runCatching { @@ -58,8 +58,6 @@ open class WebDav(urlStr: String, val authorization: Authorization) { }.getOrNull() } val host: String? get() = url.host - val path get() = url.toString() - /** * 获取当前url文件信息