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:
parent
1fb03a45a0
commit
131280c3f2
@ -122,11 +122,11 @@ public class LocalStore extends Store implements Serializable
|
|||||||
mInternalAttachmentsDir.mkdirs();
|
mInternalAttachmentsDir.mkdirs();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String externalAttachmentsPath = "/sdcard" + mPath.substring("//data".length());
|
||||||
|
mExternalAttachmentsDir = new File(externalAttachmentsPath + "_att");
|
||||||
if (mAccount.isStoreAttachmentOnSdCard()
|
if (mAccount.isStoreAttachmentOnSdCard()
|
||||||
&& !Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED))
|
&& !Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED))
|
||||||
{
|
{
|
||||||
String externalAttachmentsPath = "/sdcard" + mPath.substring("//data".length());
|
|
||||||
mExternalAttachmentsDir = new File(externalAttachmentsPath + "_att");
|
|
||||||
if (!mExternalAttachmentsDir.exists())
|
if (!mExternalAttachmentsDir.exists())
|
||||||
{
|
{
|
||||||
mExternalAttachmentsDir.mkdirs();
|
mExternalAttachmentsDir.mkdirs();
|
||||||
|
Loading…
Reference in New Issue
Block a user