Fix for problem with r386 found by kanisdragon.

This commit is contained in:
Daniel Applebaum 2009-03-02 00:47:27 +00:00
parent 19c93d1816
commit 73d5e16178
1 changed files with 10 additions and 9 deletions

View File

@ -112,15 +112,7 @@ public class LocalStore extends Store implements Serializable {
Log.i(Email.LOG_TAG, String.format("Upgrading database from version %d to version %d",
mDb.getVersion(), DB_VERSION));
try
{
pruneCachedAttachments(true);
}
catch (MessagingException me)
{
Log.e(Email.LOG_TAG, "Exception while force pruning attachments during DB update", me);
}
AttachmentProvider.clear(application);
mDb.execSQL("DROP TABLE IF EXISTS folders");
@ -150,6 +142,15 @@ public class LocalStore extends Store implements Serializable {
if (mDb.getVersion() != DB_VERSION) {
throw new Error("Database upgrade failed!");
}
try
{
pruneCachedAttachments(true);
}
catch (Exception me)
{
Log.e(Email.LOG_TAG, "Exception while force pruning attachments during DB update", me);
}
}
public long getSize()