优化
This commit is contained in:
@@ -160,11 +160,13 @@ class WebDav(urlStr: String) {
|
|||||||
if (url != null && auth != null) {
|
if (url != null && auth != null) {
|
||||||
//防止报错
|
//防止报错
|
||||||
return kotlin.runCatching {
|
return kotlin.runCatching {
|
||||||
okHttpClient.newCallResponseBody {
|
if (!exists()) {
|
||||||
url(url)
|
okHttpClient.newCallResponseBody {
|
||||||
method("MKCOL", null)
|
url(url)
|
||||||
addHeader("Authorization", Credentials.basic(auth.user, auth.pass))
|
method("MKCOL", null)
|
||||||
}.close()
|
addHeader("Authorization", Credentials.basic(auth.user, auth.pass))
|
||||||
|
}.close()
|
||||||
|
}
|
||||||
}.isSuccess
|
}.isSuccess
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
|||||||
Reference in New Issue
Block a user