diff --git a/app/src/main/java/io/legado/app/help/storage/WebDavHelp.kt b/app/src/main/java/io/legado/app/help/storage/WebDavHelp.kt index 128fb6078..3d82b5320 100644 --- a/app/src/main/java/io/legado/app/help/storage/WebDavHelp.kt +++ b/app/src/main/java/io/legado/app/help/storage/WebDavHelp.kt @@ -39,8 +39,8 @@ object WebDavHelp { val url = getWebDavUrl() val names = arrayListOf() if (!url.isNullOrBlank() && initWebDav()) { - val files = WebDav(url + "legado/").listFiles() - files.reversed() + var files = WebDav(url + "legado/").listFiles() + files = files.reversed() for (index: Int in 0 until min(10, files.size)) { files[index].displayName?.let { names.add(it)