From 146f2bb8a886a0dc179800a9e2a605194e123386 Mon Sep 17 00:00:00 2001 From: M66B Date: Sun, 3 Apr 2022 07:53:16 +0200 Subject: [PATCH] Use encryption folder for PGP decrypt --- app/src/main/java/eu/faircode/email/FragmentMessages.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/eu/faircode/email/FragmentMessages.java b/app/src/main/java/eu/faircode/email/FragmentMessages.java index 4bfeca9c3c..46381f6f7d 100644 --- a/app/src/main/java/eu/faircode/email/FragmentMessages.java +++ b/app/src/main/java/eu/faircode/email/FragmentMessages.java @@ -7382,7 +7382,11 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences. InputStream in = null; OutputStream out = null; boolean inline = false; - File plain = File.createTempFile("plain", "." + message.id, context.getCacheDir()); + + File tmp = new File(context.getFilesDir(), "encryption"); + if (!tmp.exists()) + tmp.mkdir(); + File plain = new File(tmp, message.id + ".pgp_out"); // Find encrypted data for (EntityAttachment attachment : attachments)