diff --git a/src/com/fsck/k9/mail/store/LocalStore.java b/src/com/fsck/k9/mail/store/LocalStore.java index d7417c2e1..b93304ea2 100644 --- a/src/com/fsck/k9/mail/store/LocalStore.java +++ b/src/com/fsck/k9/mail/store/LocalStore.java @@ -156,6 +156,8 @@ public class LocalStore extends Store implements Serializable { AttachmentProvider.clear(mApplication); + db.beginTransaction(); + try { try { // schema version 29 was when we moved to incremental updates // in the case of a new db or a < v29 db, we blow away and start from scratch @@ -385,6 +387,11 @@ public class LocalStore extends Store implements Serializable { throw new Error("Database upgrade failed!"); } + db.setTransactionSuccessful(); + } finally { + db.endTransaction(); + } + // 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