diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 0ae9917..913d316 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -25,8 +25,8 @@ android { minSdk = 29 targetSdk = 34 - versionCode = 1708536356 - versionName = "0.26.0-beta" + versionCode = 1708536357 + versionName = "0.26.1-beta" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/java/f/cking/software/data/database/AppDatabase.kt b/app/src/main/java/f/cking/software/data/database/AppDatabase.kt index 7678024..e2276ce 100644 --- a/app/src/main/java/f/cking/software/data/database/AppDatabase.kt +++ b/app/src/main/java/f/cking/software/data/database/AppDatabase.kt @@ -64,8 +64,10 @@ abstract class AppDatabase : RoomDatabase() { throw IllegalStateException("The database file doesn't exist") } context.contentResolver.openOutputStream(toUri)?.use { outputStream -> - outputStream.write(dbFile.readBytes()) - } + dbFile.inputStream().use { inputStream -> + inputStream.copyTo(outputStream) + } + } ?: throw RuntimeException("Cannot create a backup file stream") } }