Merge pull request #2119 from 821938089/little-fix

优化
pull/2121/head
kunfei 2 years ago committed by GitHub
commit 97b74d9c98
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      app/src/main/java/io/legado/app/help/coroutine/Coroutine.kt
  2. 2
      app/src/main/java/io/legado/app/lib/webdav/WebDav.kt

@ -159,7 +159,9 @@ class Coroutine<T>(
error?.let { dispatchCallback(this, e, it) } error?.let { dispatchCallback(this, e, it) }
} }
} finally { } finally {
finally?.let { dispatchVoidCallback(this, it) } withContext(NonCancellable) {
finally?.let { dispatchVoidCallback(this, it) }
}
} }
} }
} }

@ -71,7 +71,7 @@ open class WebDav(val path: String, val authorization: Authorization) {
private val webDavClient by lazy { private val webDavClient by lazy {
val authInterceptor = Interceptor { chain -> val authInterceptor = Interceptor { chain ->
var request = chain.request() var request = chain.request()
if (request.url.host == host) { if (request.url.host.equals(host, true)) {
request = request request = request
.newBuilder() .newBuilder()
.header(authorization.name, authorization.data) .header(authorization.name, authorization.data)

Loading…
Cancel
Save