From 7d67ae2e859966343acf73a1ef12ecb769544d9e Mon Sep 17 00:00:00 2001 From: gedoor Date: Mon, 10 May 2021 20:20:03 +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 | 10 ++++++---- 1 file changed, 6 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 06f178cbf..6052e68ff 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 @@ -63,17 +63,19 @@ class WebDav(urlStr: String) { /** * 列出当前路径下的文件 * - * @param propsList 指定列出文件的哪些属性 * @return 文件列表 */ - suspend fun listFiles(propsList: ArrayList = ArrayList()): List { - propFindResponse(propsList)?.let { body -> + suspend fun listFiles(): List { + propFindResponse()?.let { body -> return parseDir(body) } return ArrayList() } - private suspend fun propFindResponse(propsList: ArrayList): String? { + /** + * @param propsList 指定列出文件的哪些属性 + */ + private suspend fun propFindResponse(propsList: List = emptyList()): String? { val requestProps = StringBuilder() for (p in propsList) { requestProps.append("\n")