mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-25 18:47:51 +02:00
Try to avoid crashing when unable to get backup filename for some reason
This commit is contained in:
@ -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(
|
||||
|
Reference in New Issue
Block a user