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:
@@ -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));
|
||||
|
||||
|
Reference in New Issue
Block a user