1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-11-24 02:12:15 -05:00

We still need to be able to instanciate the LocalStore when the sd card is not mounted. So we do no throw an exception then. Exception will be thrown when we try to do attachment related things

This commit is contained in:
Bao-Long Nguyen-Trong 2010-02-06 15:44:21 +00:00
parent 55dac7ee4e
commit 8403a265d9

View File

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