Skip to content

Commit

Permalink
Fix a possible crash when creating a backup on invalid target folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Nain57 committed Sep 7, 2024
1 parent 7763fbd commit ee9012e
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ internal class BackupEngine(appDataDir: File, private val contentResolver: Conte
} catch (ioEx: IOException) {
Log.e(TAG, "Error while creating backup archive.")
progress.onError()
} catch (isEx: IllegalStateException) {
Log.e(TAG, "Error while creating backup archive, target folder can't be written")
progress.onError()
} catch (secEx: SecurityException) {
Log.e(TAG, "Error while creating backup archive, permission is denied")
progress.onError()
}
}
}
Expand Down

0 comments on commit ee9012e

Please sign in to comment.