rafi0101 / Android-Room-Database-Backup

Simple tool to backup and restore your room database in Android
MIT License
239 stars 19 forks source link

cannot select backup for restore if it was created with the default filename #39

Open xgimp opened 1 week ago

xgimp commented 1 week ago

First of all - thank you for this great library.

Describe the bug I cannot restore backup created with the default name.

my backup method looks like this:

    private fun createBackup(roomBackup: RoomBackup) {
        roomBackup
            .backupLocation(RoomBackup.BACKUP_FILE_LOCATION_CUSTOM_DIALOG)
            .database(dbInstance)
       ...

and the restore function looks something like this:

    private fun restoreBackup(roomBackup: RoomBackup) {
        roomBackup
            .backupLocation(RoomBackup.BACKUP_FILE_LOCATION_CUSTOM_DIALOG)
            .database(dbInstance)
...

I encountered strange issue on android 15 when i can create backup just fine, but i cant select it later for restore, if i leave the default name.

Expected behavior Should be able to restore the backup that was created with the default filename.

Screenshots Záznam obrazovky z 2024-09-17 21-35-06.webm

Smartphone (please complete the following information):

Additional context On older android versions, I am able to restore all backups regardless of filename

rafi0101 commented 2 days ago

Thank you, I'll have a look at this