summary refs log tree commit diff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--export.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/export.c b/export.c
index 799bd7c..7a04358 100644
--- a/export.c
+++ b/export.c
@@ -228,7 +228,11 @@ static int exportHTMLBody(
 			if (error) return error;
 			section->len--;
 		}
-		return 0;
+		if (attached) {
+			return htmlAttachmentClose(file);
+		} else {
+			return 0;
+		}
 
 	} else if (part->message.structure) {
 		const struct BodyPart *structure = part->message.structure;