From 4ac02018fa1bfc7ac9637c147cf16672e5edc280 Mon Sep 17 00:00:00 2001 From: Torsten Grote Date: Thu, 13 Jun 2024 17:44:18 -0300 Subject: [PATCH] Fix uncaught throwable with dufs WebDAV server The underlying issue will affect other functionality though: https://github.com/sigoden/dufs/issues/400 --- .../com/stevesoltys/seedvault/plugins/StoragePluginManager.kt | 2 +- .../stevesoltys/seedvault/plugins/webdav/WebDavStoragePlugin.kt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/stevesoltys/seedvault/plugins/StoragePluginManager.kt b/app/src/main/java/com/stevesoltys/seedvault/plugins/StoragePluginManager.kt index d4614e39..aa8ec43e 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/plugins/StoragePluginManager.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/plugins/StoragePluginManager.kt @@ -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 } diff --git a/app/src/main/java/com/stevesoltys/seedvault/plugins/webdav/WebDavStoragePlugin.kt b/app/src/main/java/com/stevesoltys/seedvault/plugins/webdav/WebDavStoragePlugin.kt index 8bd9c972..952a42cd 100644 --- a/app/src/main/java/com/stevesoltys/seedvault/plugins/webdav/WebDavStoragePlugin.kt +++ b/app/src/main/java/com/stevesoltys/seedvault/plugins/webdav/WebDavStoragePlugin.kt @@ -163,7 +163,7 @@ internal class WebDavStoragePlugin( override suspend fun getAvailableBackups(): Sequence? { 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 }