From 76dfb8d6d8fc559ad8fb59c9695486d24ebfb076 Mon Sep 17 00:00:00 2001 From: kunfei Date: Mon, 10 Feb 2020 14:04:47 +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/help/storage/WebDavHelp.kt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 b48a0b646..731085035 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 @@ -19,6 +19,7 @@ import java.util.* import kotlin.math.min object WebDavHelp { + private const val defaultWebDavUrl = "https://dav.jianguoyun.com/dav/" private val zipFilePath = FileUtils.getCachePath() + "/backup" + ".zip" private val unzipFilesPath by lazy { FileUtils.getCachePath() @@ -26,7 +27,9 @@ object WebDavHelp { private fun getWebDavUrl(): String? { var url = App.INSTANCE.getPrefString(PreferKey.webDavUrl) - if (url.isNullOrBlank()) return null + if (url.isNullOrEmpty()) { + url = defaultWebDavUrl + } if (!url.endsWith("/")) url += "/" return url }