From be3e31ddc44d21ba185efa203f08f182df88195c Mon Sep 17 00:00:00 2001 From: arkon Date: Fri, 25 Dec 2020 22:53:58 -0500 Subject: [PATCH] Try to avoid crashing when unable to get backup filename for some reason --- .../eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt index c6ddb1bdc..ed7936ec8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsBackupController.kt @@ -203,7 +203,7 @@ class SettingsBackupController : SettingsController() { } CODE_BACKUP_RESTORE -> { uri?.path?.let { - val fileName = DocumentFile.fromSingleUri(activity, uri)!!.name!! + val fileName = DocumentFile.fromSingleUri(activity, uri)?.name ?: uri.toString() when { fileName.endsWith(".proto.gz") -> { val options = arrayOf(