mirror of
https://github.com/moparisthebest/k-9
synced 2025-02-19 20:21:45 -05:00
Fix for problem with r386 found by kanisdragon.
This commit is contained in:
parent
19c93d1816
commit
73d5e16178
@ -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",
|
Log.i(Email.LOG_TAG, String.format("Upgrading database from version %d to version %d",
|
||||||
mDb.getVersion(), DB_VERSION));
|
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);
|
AttachmentProvider.clear(application);
|
||||||
|
|
||||||
mDb.execSQL("DROP TABLE IF EXISTS folders");
|
mDb.execSQL("DROP TABLE IF EXISTS folders");
|
||||||
@ -150,6 +142,15 @@ public class LocalStore extends Store implements Serializable {
|
|||||||
if (mDb.getVersion() != DB_VERSION) {
|
if (mDb.getVersion() != DB_VERSION) {
|
||||||
throw new Error("Database upgrade failed!");
|
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()
|
public long getSize()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user