1
0
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:
cketti 2012-07-07 17:15:14 +02:00
parent d08169b004
commit 83e57064ff

View File

@ -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