1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-30 13:12:25 -05:00

Still init LocalStore.mExternalAttachmentsDir even if sd card is not ready so that the object does not end up in a bad state

This commit is contained in:
Bao-Long Nguyen-Trong 2010-02-07 05:58:04 +00:00
parent 1fb03a45a0
commit 131280c3f2

View File

@ -122,11 +122,11 @@ public class LocalStore extends Store implements Serializable
mInternalAttachmentsDir.mkdirs();
}
String externalAttachmentsPath = "/sdcard" + mPath.substring("//data".length());
mExternalAttachmentsDir = new File(externalAttachmentsPath + "_att");
if (mAccount.isStoreAttachmentOnSdCard()
&& !Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED))
{
String externalAttachmentsPath = "/sdcard" + mPath.substring("//data".length());
mExternalAttachmentsDir = new File(externalAttachmentsPath + "_att");
if (!mExternalAttachmentsDir.exists())
{
mExternalAttachmentsDir.mkdirs();