diff --git a/src/com/android/email/MessagingController.java b/src/com/android/email/MessagingController.java index eb7f0827c..28aa0a84d 100644 --- a/src/com/android/email/MessagingController.java +++ b/src/com/android/email/MessagingController.java @@ -1392,10 +1392,6 @@ s * critical data as fast as possible, and then we'll fill in the de Store localStore = Store.getInstance(account.getLocalStoreUri(), mApplication); LocalFolder localFolder = (LocalFolder)localStore.getFolder(account.getErrorFolderName()); - if (localFolder.exists() == false) - { - localFolder.create(Folder.FolderType.HOLDS_MESSAGES); - } Message[] messages = new Message[1]; Message message = new MimeMessage(); ByteArrayOutputStream baos = new ByteArrayOutputStream(); @@ -1733,10 +1729,6 @@ s * critical data as fast as possible, and then we'll fill in the de Store localStore = Store.getInstance(account.getLocalStoreUri(), mApplication); LocalFolder localFolder = (LocalFolder) localStore.getFolder(account.getOutboxFolderName()); - if (!localFolder.exists()) - { - localFolder.create(Folder.FolderType.HOLDS_MESSAGES); - } localFolder.open(OpenMode.READ_WRITE); localFolder.appendMessages(new Message[] { message @@ -2236,10 +2228,6 @@ s * critical data as fast as possible, and then we'll fill in the de Store localStore = Store.getInstance(account.getLocalStoreUri(), mApplication); LocalFolder localFolder = (LocalFolder) localStore.getFolder(account.getDraftsFolderName()); - if (!localFolder.exists()) - { - localFolder.create(Folder.FolderType.HOLDS_MESSAGES); - } localFolder.open(OpenMode.READ_WRITE); localFolder.appendMessages(new Message[] { message diff --git a/src/com/android/email/mail/store/LocalStore.java b/src/com/android/email/mail/store/LocalStore.java index ee76bbc37..398f26e11 100644 --- a/src/com/android/email/mail/store/LocalStore.java +++ b/src/com/android/email/mail/store/LocalStore.java @@ -359,6 +359,9 @@ public class LocalStore extends Store implements Serializable { if (isOpen()) { return; } + if (!exists()) { + create(FolderType.HOLDS_MESSAGES); + } Cursor cursor = null; try { cursor = mDb.rawQuery("SELECT id, unread_count, visible_limit, last_updated, status FROM folders "