From 6619a3a97cc94960e5ea6387f59f1cc07977096d Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 20 Jun 2022 21:48:29 +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 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 cf24d7e99..9489a350a 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 @@ -74,7 +74,6 @@ open class WebDav(urlStr: String, val authorization: Authorization) { /** * 列出当前路径下的文件 - * * @return 文件列表 */ @Throws(WebDavException::class) @@ -118,6 +117,9 @@ open class WebDav(urlStr: String, val authorization: Authorization) { }.body?.text() } + /** + * 解析webDav返回的xml + */ private fun parseBody(s: String): List { val list = ArrayList() val document = Jsoup.parse(s) @@ -299,6 +301,9 @@ open class WebDav(urlStr: String, val authorization: Authorization) { }.isSuccess } + /** + * 检测返回结果是否正确 + */ private fun checkResult(response: Response) { if (!response.isSuccessful) { throw WebDavException("${url}\n${response.code}:${response.message}")