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:
Torsten Grote 2024-06-13 17:44:18 -03:00
parent 56e26083fc
commit 4ac02018fa
No known key found for this signature in database
GPG key ID: 3E5F77D92CF891FF
2 changed files with 2 additions and 2 deletions

View file

@ -139,7 +139,7 @@ class StoragePluginManager(
suspend fun getFreeSpace(): Long? {
return try {
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)
null
}

View file

@ -163,7 +163,7 @@ internal class WebDavStoragePlugin(
override suspend fun getAvailableBackups(): Sequence<EncryptedMetadata>? {
return try {
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)
null
}