1
0
mirror of https://github.com/oliexdev/openScale.git synced 2025-08-07 01:06:57 +02:00

close database before importing the database

This commit is contained in:
oliexdev
2025-03-03 11:53:32 +01:00
parent 530a005f56
commit 3e36fae2de

View File

@@ -461,6 +461,10 @@ public class OpenScale {
File tmpExportFile = context.getApplicationContext().getDatabasePath("openScale_tmp.db");
try {
if (appDB != null) {
appDB.close();
}
copyFile(Uri.fromFile(exportFile), Uri.fromFile(tmpExportFile));
copyFile(importFile, Uri.fromFile(exportFile));