Skip to content

Commit

Permalink
Fix possible crashes when imported an invalid scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
Nain57 committed Sep 7, 2024
1 parent 3b144ae commit 7763fbd
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ internal class BackupEngine(appDataDir: File, private val contentResolver: Conte
} catch (ioEx: IOException) {
Log.e(TAG, "Error while reading backup archive.")
progress.onError()
} catch (secEx: SecurityException) {
Log.e(TAG, "Error while reading backup archive, permission is denied")
progress.onError()
} catch (iaEx: IllegalArgumentException) {
Log.e(TAG, "Error while reading backup archive, file is invalid")
progress.onError()
}
}
}
Expand Down

0 comments on commit 7763fbd

Please sign in to comment.