Fix uncaught throwable with dufs WebDAV server
The underlying issue will affect other functionality though: https://github.com/sigoden/dufs/issues/400
This commit is contained in:
parent
56e26083fc
commit
4ac02018fa
2 changed files with 2 additions and 2 deletions
|
@ -139,7 +139,7 @@ class StoragePluginManager(
|
||||||
suspend fun getFreeSpace(): Long? {
|
suspend fun getFreeSpace(): Long? {
|
||||||
return try {
|
return try {
|
||||||
appPlugin.getFreeSpace()
|
appPlugin.getFreeSpace()
|
||||||
} catch (e: Exception) {
|
} catch (e: Throwable) { // NoClassDefFound isn't an [Exception], can get thrown by dav4jvm
|
||||||
Log.e("StoragePluginManager", "Error getting free space: ", e)
|
Log.e("StoragePluginManager", "Error getting free space: ", e)
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,7 +163,7 @@ internal class WebDavStoragePlugin(
|
||||||
override suspend fun getAvailableBackups(): Sequence<EncryptedMetadata>? {
|
override suspend fun getAvailableBackups(): Sequence<EncryptedMetadata>? {
|
||||||
return try {
|
return try {
|
||||||
doGetAvailableBackups()
|
doGetAvailableBackups()
|
||||||
} catch (e: Exception) {
|
} catch (e: Throwable) { // NoClassDefFound isn't an [Exception], can get thrown by dav4jvm
|
||||||
Log.e(TAG, "Error getting available backups: ", e)
|
Log.e(TAG, "Error getting available backups: ", e)
|
||||||
null
|
null
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue