From ca6d697eed30cf80bea8a2b36dc86be21934e7c1 Mon Sep 17 00:00:00 2001 From: ashley willis Date: Mon, 7 May 2012 09:24:13 -0500 Subject: [PATCH] fixed commit ed4c74983eb5aa1b8f5fd729a32504a69441efa2 due to crashing on 2.1 devices --- src/com/fsck/k9/mail/store/LockableDatabase.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/com/fsck/k9/mail/store/LockableDatabase.java b/src/com/fsck/k9/mail/store/LockableDatabase.java index f30deeaf0..5d2542473 100644 --- a/src/com/fsck/k9/mail/store/LockableDatabase.java +++ b/src/com/fsck/k9/mail/store/LockableDatabase.java @@ -371,12 +371,12 @@ public class LockableDatabase { try { final File databaseFile = prepareStorage(mStorageProviderId); try { - mDb = application.openOrCreateDatabase(databaseFile.getPath(), Context.MODE_PRIVATE, null); + mDb = application.openOrCreateDatabase(databaseFile.getName(), Context.MODE_PRIVATE, null); } catch (SQLiteException e) { // try to gracefully handle DB corruption - see issue 2537 Log.w(K9.LOG_TAG, "Unable to open DB " + databaseFile + " - removing file and retrying", e); databaseFile.delete(); - mDb = application.openOrCreateDatabase(databaseFile.getPath(), Context.MODE_PRIVATE, null); + mDb = application.openOrCreateDatabase(databaseFile.getName(), Context.MODE_PRIVATE, null); } if (mDb.getVersion() != mSchemaDefinition.getVersion()) { mSchemaDefinition.doDbUpgrade(mDb);