diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java
index 118f0bf8e1..082ada6731 100644
--- a/app/src/main/java/eu/faircode/email/FragmentCompose.java
+++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java
@@ -940,7 +940,7 @@ public class FragmentCompose extends FragmentBase {
}
private void onActionTakePhoto() {
- File dir = new File(getContext().getFilesDir(), "temporary");
+ File dir = new File(getContext().getCacheDir(), "photo");
if (!dir.exists())
dir.mkdir();
File file = new File(dir, new Date().getTime() + ".jpg");
@@ -1857,8 +1857,8 @@ public class FragmentCompose extends FragmentBase {
db.attachment().setDownloaded(attachment.id, size);
if ("eu.faircode.email".equals(uri.getAuthority())) {
- // content://eu.faircode.email/temporary/nnn.jpg
- File tmp = new File(context.getFilesDir(), uri.getPath());
+ // content://eu.faircode.email/photo/nnn.jpg
+ File tmp = new File(context.getCacheDir(), uri.getPath());
Log.i("Deleting " + tmp);
if (!tmp.delete())
Log.w("Error deleting " + tmp);
diff --git a/app/src/main/res/xml/fileprovider_paths.xml b/app/src/main/res/xml/fileprovider_paths.xml
index 4bdb13c2f1..56ea75c076 100644
--- a/app/src/main/res/xml/fileprovider_paths.xml
+++ b/app/src/main/res/xml/fileprovider_paths.xml
@@ -6,7 +6,7 @@
-
+