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")