Skip to content

Commit 0c24d85

Browse files
committed
FIX only database files are allowed to restore #26
1 parent aba04cb commit 0c24d85

File tree

1 file changed

+2
-2
lines changed
  • core/src/main/java/de/raphaelebner/roomdatabasebackup/core

1 file changed

+2
-2
lines changed

core/src/main/java/de/raphaelebner/roomdatabasebackup/core/RoomBackup.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -716,7 +716,7 @@ class RoomBackup(var context: Context) : FragmentActivity() {
716716

717717
}
718718
PROCESS_RESTORE -> {
719-
openBackupfileChooser.launch(arrayOf("*/*"))
719+
openBackupfileChooser.launch(arrayOf("application/octet-stream"))
720720
}
721721
}
722722
}
@@ -740,7 +740,7 @@ class RoomBackup(var context: Context) : FragmentActivity() {
740740
/**
741741
* Opens the [ActivityResultContracts.CreateDocument] and prompts the user to select a path for creating the new backup file
742742
*/
743-
private val openBackupfileCreator = (context as ComponentActivity).registerForActivityResult(CreateDocument("todo/todo")) { result ->
743+
private val openBackupfileCreator = (context as ComponentActivity).registerForActivityResult(CreateDocument("application/octet-stream")) { result ->
744744
if (result != null) {
745745
val out = context.contentResolver.openOutputStream(result)!!
746746
doBackup(out)

0 commit comments

Comments
 (0)