aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compose.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/src/compose.c b/src/compose.c
index 0e35f5ca..1ad4aea4 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -3013,19 +3013,14 @@ static gint compose_write_to_file(Compose *compose, const gchar *file,
return -1;
}
-#if USE_GPGME
- if (!rfc2015_is_available() || is_draft) {
- uncanonicalize_file_replace(file);
- return 0;
+ if (canonicalize_file_replace(file) < 0) {
+ g_unlink(file);
+ return -1;
}
- if ((compose->use_signing && !compose->account->clearsign) ||
- compose->use_encryption) {
- if (canonicalize_file_replace(file) < 0) {
- g_unlink(file);
- return -1;
- }
- }
+#if USE_GPGME
+ if (!rfc2015_is_available() || is_draft)
+ return 0;
if (compose->use_signing && !compose->account->clearsign) {
GSList *key_list;
@@ -3045,8 +3040,6 @@ static gint compose_write_to_file(Compose *compose, const gchar *file,
}
#endif /* USE_GPGME */
- uncanonicalize_file_replace(file);
-
return 0;
}