Compare commits
2 Commits
812b40b42f
...
0131d8d4fd
| Author | SHA1 | Date | |
|---|---|---|---|
| 0131d8d4fd | |||
| d2ca3f1918 |
@@ -150,7 +150,12 @@ open class WebDavProvider(protected val account: CloudAccount) : CloudProvider {
|
|||||||
withContext(Dispatchers.IO) {
|
withContext(Dispatchers.IO) {
|
||||||
val req = Request.Builder().url(url(remotePath)).method("MKCOL", null).build()
|
val req = Request.Builder().url(url(remotePath)).method("MKCOL", null).build()
|
||||||
client.newCall(req).execute().use { resp ->
|
client.newCall(req).execute().use { resp ->
|
||||||
if (!resp.isSuccessful && resp.code != 405) throw Exception("MKCOL HTTP ${resp.code}")
|
// 405 = directory already exists (most servers)
|
||||||
|
// 423 = Locked — SFTPGo returns this when the dir exists and has a lock;
|
||||||
|
// treat as "already there", not a failure, so uploads inside it proceed.
|
||||||
|
if (!resp.isSuccessful && resp.code != 405 && resp.code != 423) {
|
||||||
|
throw Exception("MKCOL HTTP ${resp.code}")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,2 +1,2 @@
|
|||||||
VERSION_NAME=1.0.72
|
VERSION_NAME=1.0.73
|
||||||
VERSION_CODE=72
|
VERSION_CODE=73
|
||||||
|
|||||||
Reference in New Issue
Block a user