diff --git a/app/src/main/java/eu/faircode/email/FragmentCompose.java b/app/src/main/java/eu/faircode/email/FragmentCompose.java index 2e460621df..c221fca1fd 100644 --- a/app/src/main/java/eu/faircode/email/FragmentCompose.java +++ b/app/src/main/java/eu/faircode/email/FragmentCompose.java @@ -1845,7 +1845,7 @@ public class FragmentCompose extends FragmentBase { SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context); boolean autoresize = prefs.getBoolean("autoresize", true); - if (autoresize && + if (autoresize && file.exists() /* upload cancelled */ && ("image/jpeg".equals(attachment.type) || "image/png".equals(attachment.type))) { BitmapFactory.Options options = new BitmapFactory.Options(); options.inJustDecodeBounds = true; @@ -1891,7 +1891,6 @@ public class FragmentCompose extends FragmentBase { db.attachment().setDownloaded(attachment.id, size); - } catch (IOException ex) { // Reset progress on failure db.attachment().setProgress(attachment.id, null);