Skip to content

Commit

Permalink
优化
Browse files Browse the repository at this point in the history
  • Loading branch information
821938089 committed Nov 19, 2024
1 parent 9fc3d4d commit d0f4399
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/src/main/java/io/legado/app/lib/webdav/WebDav.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ import io.legado.app.help.http.okHttpClient
import io.legado.app.help.http.text
import io.legado.app.model.analyzeRule.AnalyzeUrl
import io.legado.app.model.analyzeRule.CustomUrl
import io.legado.app.utils.*
import io.legado.app.utils.NetworkUtils
import io.legado.app.utils.findNS
import io.legado.app.utils.findNSPrefix
import io.legado.app.utils.printOnDebug
import io.legado.app.utils.toRequestBody
import kotlinx.coroutines.Dispatchers.IO
import kotlinx.coroutines.withContext
import okhttp3.Interceptor
Expand Down Expand Up @@ -188,7 +192,8 @@ open class WebDav(
}
val displayName = element
.findNS("displayname", ns)
.firstOrNull()?.text()?.takeIf { it.isNotEmpty() } ?: fileName
.firstOrNull()?.text()?.takeIf { it.isNotEmpty() }
?.let { URLDecoder.decode(it.replace("+", "%2B"), "UTF-8") } ?: fileName
val contentType = element
.findNS("getcontenttype", ns)
.firstOrNull()?.text().orEmpty()
Expand Down

0 comments on commit d0f4399

Please sign in to comment.