mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-26 09:38:52 -05:00
Check database version after ending the transaction
This commit is contained in:
parent
d08169b004
commit
83e57064ff
@ -379,15 +379,15 @@ public class LocalStore extends Store implements Serializable {
|
||||
|
||||
db.setVersion(DB_VERSION);
|
||||
|
||||
if (db.getVersion() != DB_VERSION) {
|
||||
throw new Error("Database upgrade failed!");
|
||||
}
|
||||
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
|
||||
if (db.getVersion() != DB_VERSION) {
|
||||
throw new Error("Database upgrade failed!");
|
||||
}
|
||||
|
||||
// Unless we're blowing away the whole data store, there's no reason to prune attachments
|
||||
// every time the user upgrades. it'll just cost them money and pain.
|
||||
// try
|
||||
|
Loading…
Reference in New Issue
Block a user